We have an Enterprise deployment and the only thing on the server is Esri Enterprise. We access Portal, Server, etc through the default URLs: www.example-enterprise.com/portal, www.example-enterprise.com/arcgis, etc. managed via IIS as configured by Enterprise during install and everything is dandy.
But I don't have anything at www.example-enterprise.com and it just dumps to the IIS Welcome screen.
What do you all typically do in this situation? I've seen other Portals configure to redirect the root to Portal Home. Is that standard best practice? I believe that has to be set manually in IIS. Are there any concerns with doing that? It seems like the most logical course of action if that Site is only for Esri Enterprise.
Solved! Go to Solution.
Hey @JonathanDandois
You have a great question, I found this myself at first as well and was uncomfortable with the fact that it showed up as a blank IIS page. In my case, I setup a redirect through IIS to link directly to the Portal as normally that is where users would like to go by default. If you need any tips and tricks on how to do that, I can definitely provide!
But as a side note, I did not experience any issues when doing this.
Cody
@JonathanDandois - Yes, you can make the URL to resolve to any specific URL that you want, see examples below on how you can do this in IIS.
Option 1: IIS HTTP Redirect
https://docs.microsoft.com/en-us/iis/configuration/system.webserver/httpredirect/
web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpRedirect enabled="true" destination=" the URL to redirect " httpResponseStatus="Permanent" />
</system.webServer>
</configuration>
Option 2: URL Rewrite
https://www.iis.net/downloads/microsoft/url-rewrite
Option 3: Default Page
There is an elegant solution to this problem using default page.
First create "Default.aspx" file with content similar to this:
<%@ Page Language="C#" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <% //redirect to specific web application. You can also parse request and redirect to specific application... Response.Redirect(@"http://www.example.net/Application1"); %> </div> </form> </body> </html>
Copy this file on IIS root (commonly "C:\inetpub\wwwroot") and add default document on Default Web Site "Default.aspx" if already not exists.
So how this works? When request comes to IIS root, IIS will look for default document. In this case will be "Default.aspx". This page will then redirect client to your target application.
Of course you can use the same principle with plain HTML document on IIS root.
Another Example:
default.aspx
<%@ Page Language="C#" %><%
string host = Request.Headers["Host"];
if (host != null && host.IndexOf("road", StringComparison.InvariantCultureIgnoreCase) != -1)
{
Response.Redirect("https://roadsandhighs.acme.com/roads/");
}
else if (host != null && host.IndexOf("pipe", StringComparison.InvariantCultureIgnoreCase) != -1)
{
Response.Redirect("https://pipelines.acme.com/pipeline/");
}
%><html><head><title>ArcGIS Location Referencing Server</title></head><body></body></html>
Hey @JonathanDandois
You have a great question, I found this myself at first as well and was uncomfortable with the fact that it showed up as a blank IIS page. In my case, I setup a redirect through IIS to link directly to the Portal as normally that is where users would like to go by default. If you need any tips and tricks on how to do that, I can definitely provide!
But as a side note, I did not experience any issues when doing this.
Cody
@CodyPatterson @MarceloMarques thanks for the quick feedback. this does make sense. I'll give it a go!
It depends on the client. 9 times out of 10 I will use the IIS rewrite methods described above. However, sometimes clients don't like the rewrite method - they feel it's 'bouncing' somewhere and it looks potentially malicious. In those situations, I use a simple html page, just white background and text explaining what is happening:
<html>
<head>
<title>geoworx Limited</title>
<META http-equiv="refresh" content="1;URL=https://hub.geoworx.co.nz/portal/home/">
</head>
<body bgcolor="#ffffff">
<center>Redirecting to <a href="https://hub.geoworx.co.nz/portal/home /"> https://hub.geoworx.co.nz/portal/home/ </a>
</center>
</body>
</html>
The bold number states how many seconds it will wait until the redirect occurs. You can see this in operation here:
It's really simple and obviously you could add CSS/Branding to it as well.
To redirect your root URL in ArcGIS Enterprise, you can configure IIS to redirect users to your Portal. Here are three methods you can consider
For detailed steps, you can refer to the IIS documentation linked in the forum post.
Thanks