Rewrite URL but the "https://website.company.com/whatever/" part in browser must not change optically

0

Hello,

I'm familiar with URL rewriting etc. but this is a use-case I have not been able to solve so far:

If the URL a user types is:  "https://website.internal-intranet.local"   then they should go to  "https://website.internal-intranet.local"  (so nothing changes)

but

If the URL a user types is:  "https://website.internal-intranet.local/account/something"   then they should go to  "https://apphoster.company.com/account/something"  BUT optically, the url in the browser should remain looking like   "https://website.internal-intranet.local/account/something"

so adding the  "/account"  part to the url  of their own Intranet should make the website from that external company appear to look like it runs internally.

Basically, only the first part, so everything BEFORE the  "/account/something"  should be rewritten, but not optically in the URL bar.

1 comment

Avatar
0
Tony Vaughan

Hi Steven,

if you are keeping the "path" the same when changing the domain,
i.e.

"https://website.internal-intranet.local/account/something"   -> "https://apphoster.company.com/account/something"
"https://website.internal-intranet.local/newtestpage"   -> "https://apphoster.company.com/newtestpage"

then you can use a replace header

you can find some examples here
https://support.kemptechnologies.com/hc/en-us/articles/115004181826-Content-Rule-Examples#Change%20Host
2.2.2 Option 2: Rewrite the URL

let me know if there is something here I missed