troubleshooting Question

http redirect depending on URL / Domain / Location of htm file

Avatar of loveboatexpress
loveboatexpressFlag for United States of America asked on
2 Comments1 Solution273 ViewsLast Modified:
this is a very similar question to: 

However in this situation, the page might be accessed by unc path or mapped drive.


This is fine, but I would like to redirect the browser to:


where folder is a virtual directory of an SSL enabled webserver that points back to X:\company\website\

This doesn't work, but the concept is correct:

if (window.location.hostname != "https://alias.domain.tld/folder/index.htm")
     window.location.replace(window.location.href.replace(window.location.hostname, "https://alias.domain.tld/folder/index.htm"));
Systems architect
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros