rewrite rule not working with redirects.

ISAPI_Rewrite is a powerful URL manipulation engine based on regular expressions
User avatar
Posts: 3
Joined: 13 Oct 2015, 06:53

rewrite rule not working with redirects.

13 Oct 2015, 12:22

I have put in a new rule on our reverse proxy for a new site thats being implemented:

RewriteCond Host: totalmobile.xyz
RewriteProxy (.*) https://totalmobile.xyz:8449$1 [I]

Most the of the website works, however certain URL's do not, such as:

https://totalmobile.xyz/Live/WebAdmin/A ... n#settings

The URL's that do not work have a "#" in them. I think the proxy ignores anything after the # and so the rewrite doesn't work. Or the URL is getting mangled somehow.

Is there any way of getting this to work using isapi rewrite v2?

many thanks - Gus

User avatar
Posts: 402
Joined: 06 Mar 2012, 11:59

Re: rewrite rule not working with redirects.

14 Oct 2015, 07:43

Hello.

Part after '#' is called HTML Bookmark and is intended for client browser so never sent to the server at all. Thus this part cannot be proxied because proxy server does not receive it.
Your problem must be somewhere in client side JavaScript that parses or sends this link incorrectly.

User avatar
Posts: 3
Joined: 13 Oct 2015, 06:53

Re: rewrite rule not working with redirects.

14 Oct 2015, 07:59

Hi Yaroslav - many thanks for replying to me.
I can see what you mean, however if I put an entry in my hosts file and turn off the websense proxy so I hit the website directly rather than going out and then back in through the reverse proxy it all works, so it kind of indicates that its the RP at fault.
thanks - Gus

User avatar
Posts: 402
Joined: 06 Mar 2012, 11:59

Re: rewrite rule not working with redirects.

14 Oct 2015, 08:04

This may indicate RP triggers the error sequence. Please show an example online where I can see non working links so I could tell more about it.

User avatar
Posts: 3
Joined: 13 Oct 2015, 06:53

Re: rewrite rule not working with redirects.

14 Oct 2015, 08:57

Hi Yaroslav - I cant give you the full URl but the last bit is like this:

WebAdmin/Administration/Administration#settings

you would also need to log into the website to hit the full URL.

cheers - Gus

User avatar
Posts: 402
Joined: 06 Mar 2012, 11:59

Re: rewrite rule not working with redirects.

14 Oct 2015, 09:08

There is not much I can do without seeing the page behavior. As I said these must be something with client side script involved, maybe some hardcoded URLs, etc.
On other hand the '#' symbol in the link may not be connected to the error at all. Is the same link without '#' works? What kind of error you are getting?

Return to ISAPI_Rewrite 2.x

Who is online

Users browsing this forum: No registered users and 1 guest