Essentials Site Redirect
Essential Manager - 4.9.2.46
Html Viewer - 2.10.1
We updated one of our sites last month, and the url name changed from http://maps.kirklandwa.gov/Html5Viewer/?viewer=CapitalImprovement to https://maps.kirklandwa.gov/Html5Viewer/?viewer=cip
I'm trying to figure out how to automatically refer anyone using the old link, to use the new link instead. I was told by our web person that we might be able to set up a 301 redirect on our server, but I can't seem to figure it out. We have multiple essentials sites on maps.kirklandwa.gov. Only our CIP site changed. I've searched online, and also on here but haven't found anything that matches our particular situation.
Any help would be greatly appreciated! Joe
0
-
Hi Joe,
Have a look at this article -
https://docs.geocortex.com/essentials/gvh/latest/admin-help/Default.htm#gvh/admin/viewer-urls.htm#edit-the-viewersettings-json-js-file
The ID would be CapitalImprovement and it should point to the viewer config file used by cip
Regards,
Wayne Richard
Latitude Geographics Group Ltd.
Head Office: 300 – 1117 Wharf Street Victoria, BC Canada V8W 1T7
Tel: (250) 381-8130 | Fax: (250) 381-8132 | wrichard@latitudegeo.com
Developers of Geocortex web-based mapping software | www.geocortex.com
An Esri Platinum Business Partner0 -
Thank You. Based on you suggestion I took a look at that, and updated the file. It helped but now I have a very interesting situation.
Everything is working now except one url.
https://maps.kirklandwa.gov/Html5Viewer/?viewer=capitalImprovement
If you you type (https://maps.kirklandwa.gov/Html5Viewer/?viewer=capitalImprovement) http://maps.kirklandwa.gov/Html5Viewer/?viewer=capitalImprovement it's ok. There's something about the "https" that essentials does not like.
Below is what the "viewersettings json" file looks like after i modified it. Do I need to add another item here to account for the https option?
{
"viewerSettings": [
{
"id": "CapitalImprovement",
"url": "http://maps.kirklandwa.gov/Geocortex/Essentials/REST/sites/City_of_Kirkland_Public_CIP/viewers/Kirkland_CIP/virtualdirectory/Resources/Config/Default/",
"securityUrl": ""
}
],
"endpoints": [
{
"name": "Default",
"externalUrl": "/Geocortex/Essentials/REST/viewers/"
}
]
}0 -
Hi Joe,
Can you add a test name into the file using https so I can test it here? Something like -
{
"viewerSettings": [
{
"id": "CapitalImprovement",
"url": "http://maps.kirklandwa.gov/Geocortex/Essentials/REST/sites/City_of_Kirkland_Public_CIP/viewers/Kirkland_CIP/virtualdirectory/Resources/Config/Default/",
"securityUrl": ""
},
{
"id": "Test",
"url": "https://maps.kirklandwa.gov/Geocortex/Essentials/REST/sites/City_of_Kirkland_Public_CIP/viewers/Kirkland_CIP/virtualdirectory/Resources/Config/Default/",
"securityUrl": ""
}
],
"endpoints": [
{
"name": "Default",
"externalUrl": "/Geocortex/Essentials/REST/viewers/"
}
]
}
Thanks,Wayne
0 -
Thanks Wayne.
Just finished, all the CIP sites are now just opening our default public browser, instead of the CIP site.
Below is the current "viewersettings" contents. I think I entered in everything properly.
{
"viewerSettings": [
{
"id": "CapitalImprovement",
"url": "http://maps.kirklandwa.gov/Geocortex/Essentials/REST/sites/City_of_Kirkland_Public_CIP/viewers/Kirkland_CIP/virtualdirectory/Resources/Config/Default/",
"securityUrl": ""
}
{
"id": "Test",
"url": "https://maps.kirklandwa.gov/Geocortex/Essentials/REST/sites/City_of_Kirkland_Public_CIP/viewers/Kirkland_CIP/virtualdirectory/Resources/Config/Default/",
"securityUrl": ""
}
],
"endpoints": [
{
"name": "Default",
"externalUrl": "/Geocortex/Essentials/REST/viewers/"
}
]
}0 -
The "Test" viewer worked for me. Do you recall what the error was when you used https?
As far as I can tell, this should work for you -
{
"viewerSettings": [
{
"id": "CapitalImprovement",
"url": "https://maps.kirklandwa.gov/Geocortex/Essentials/REST/sites/City_of_Kirkland_Public_CIP/viewers/Kirkland_CIP/virtualdirectory/Resources/Config/Default/",
"securityUrl": ""
}
],
"endpoints": [
{
"name": "Default",
"externalUrl": "/Geocortex/Essentials/REST/viewers/"
}
]
}
The only change I made was updating http to https.
Regards,
Wayne0 -
I apprecite your help with so much!
I modified the json file to say https instead of http, and now it's the http: file that I get an error.
this is what it says.
An error occurred.
ConfigurationDomainMismatch: Could not load viewer because the specified configuration file is not on the same domain as the viewer (https://maps.kirklandwa.gov/Geocortex/Essentials/REST/sites/City_of_Kirkland_Public_CIP/viewers/Kirkland_CIP/virtualdirectory/Resources/Config/Default/Desktop.json.js).
What I saw after I added the "test" id was instead of getting an error all the CIP URLs just went to our default GIS browser, even the "test" one, which is different from the CIP site. Did it take you to the "cip" site when you test it?0 -
In addition if I just type in the correct url, it doesn't care whether it's http, https.
http://maps.kirklandwa.gov/Html5Viewer/?viewer=cip
https://maps.kirklandwa.gov/Html5Viewer/?viewer=cip0 -
So the "ConfigurationDomainMismatch" is saying that both parts of the viewer launch URL do not match, in your case it's one part using http and the other using https. When you type in -
https://maps.kirklandwa.gov/Html5Viewer/?viewer=CapitalImprovement
what actually gets loaded is -
https://maps.kirklandwa.gov/Html5Viewer/?configbase=https://maps.kirklandwa.gov/Geocortex/Essentials/REST/sites/City_of_Kirkland_Public_CIP/viewers/Kirkland_CIP/virtualdirectory/Resources/Config/Default/Desktop.json.js
and if the part before "configbase" is http and the part after is https you will get the error.
I would recommend only using https as some functions require it now and more will follow. Something like geolocation requires https.
Please let me know if you have any questions.
Regards,
Wayne0 -
Probably too little, too late, but you can set a 301 redirect rule in IIS. It would take any request to the old URL and forward it to the new URL.
It's also fairly common to set up IIS to enforce HTTPS by automatically changing all HTTP requests with an internal redirect (make sure your viewers are ready for strict HTTPS before doing so).0 -
You can find how to set up the http to https redirect rule here:
0
Please sign in to leave a comment.
Comments
10 comments