Has anyone set up URL rewrite rules for their portal?

2133
4
01-05-2018 10:10 AM
CortWilson
Occasional Contributor

I want to configure https redirect and a URL rewrite rule so that something like this: hostname.domain.org resolves to: https://hostname.domain.org/arcgis

 

Before I dive into it, I wanted to see if anyone has any tips/tricks or ran into any difficulties that I should be aware of.

Thanks!

0 Kudos
4 Replies
PaulDavidson1
Regular Contributor

My experience is that Portal handles this behind the scenes for you when you flip it into secure mode.

To get to the server might require that it be in ssl only mode?

-Paul Davidson

0 Kudos
CortWilson
Occasional Contributor

Ah, yeah I think you're right for the https redirect part.  I just tested it. Thanks!

The next piece I am looking for is setting up a rewrite rule that it basically appends /arcgis to the end of the URL so that our users do not have to specify that part to get to the portal homepage.  Any experience with that?

0 Kudos
PaulDavidson1
Regular Contributor

The ...../arcgis is typically the default Web Adapter (WA) setting to the ArcGIS server rather than to Portal, but it depends on how your WA that Jonathan mentions is setup.

The standard way to Portal is:

https://your.FQDN/Portal/home

We typically have an enterprise home page (SharePoint in our case, or whatever CIM you're using) and we just direct all users through that via links to a variety of GIS landing pages, including Portal, along with links to all our other apps, etc..

In this case, we don't really care what or how long the URL is because the end users could care less.

We discourage them from creating any shortcuts and/or custom links.

Teach them to click a standard access point and support headaches go down.

This allows us to change actual URLs, such as when migrating to a new server with a new ArcGIS version.

Keep both old and new going at once and once the new is ready, swap out the landing point and it's seamless to end users.

Sounds like you want to use a shorthand for redirect to .../portal/home?

If you're using the IIS WA, then it looks like Jonathan has provided nice links for that info.

I imagine that works about as well as the above but it still means end users having to know a URL and get it right vs. just a click.

Hope that helps.

PS - one note, I have had issues with going back and forth between https and http in Portal.  Seems best to just pick https and use that.

If you go back to http, it seems that you often still get redirect to the https at various time when in the admin/configuration sections of portal but it's been awhile since I've messed with that.

This was in 10.4.1  Haven't pulled the 10.5.1 plug yet, too busy with other stuff.  But 10.5.1 features look so very useful.

0 Kudos
JonathanQuinn
Esri Frequent Contributor

It's important to mention what you're using for the front end, the web adaptor, Apache, Nginx, etc.  Each have their own ways to rewrite URLs.

If you're using the Web Adaptor in IIS, you can use the URL Rewrite module.  This page has an example.