can i break the redirect?
6 posts
• Page 1 of 1
can i break the redirect?
Hi,
I have set up some redirects using the tool, to navigate users from old sites to new sites.
However there is a requirement to enable certain users to break the redirect if needed (to access certain content they may still need).
Can this be done with ISAPI_Rewrite 2.x? If so, how?
Thanks
I have set up some redirects using the tool, to navigate users from old sites to new sites.
However there is a requirement to enable certain users to break the redirect if needed (to access certain content they may still need).
Can this be done with ISAPI_Rewrite 2.x? If so, how?
Thanks
Re: can i break the redirect?
kmann wrote:I have set up some redirects using the tool, to navigate users from old sites to new sites.
However there is a requirement to enable certain users to break the redirect if needed (to access certain content they may still need).
Can this be done with ISAPI_Rewrite 2.x? If so, how?
It depends on the used authentication method. If there is a user name inside an URL or cookie or header, for example, then it is possible to exclude it from processing. Otherwise, no.
Re: can i break the redirect?
Hi,
Please could you elaborate further (with an example) on how to do this if a username does exist within the URL or cookie?
Thanks
Please could you elaborate further (with an example) on how to do this if a username does exist within the URL or cookie?
Thanks
Re: can i break the redirect?
kmann wrote:Hi,
Please could you elaborate further (with an example) on how to do this if a username does exist within the URL or cookie?
For example, if URL is like https://somesite/someaction?user=user the following condition could be used to stop a rule processing:
RewriteCond URL (?![^?]+\?user=user).*
Since there are many possible variations, it would be better if you tell me the URL (or cookie format) that is interesting for you.
Re: can i break the redirect?
Hi,
Makes sense. However say for example the my current redirection rule is as follows:
#Redirect all requests
RewriteCond Host: tstsps101\:45775
RewriteRule /test/.* https\://site.com/default.aspx [I,RP]
Now I want the redirect to stop if it contains 'user=admin' in the URL, for example:
https://tstsps101:45775/test/default.aspx?user=admin
https://tstsps101:45775/test/home.aspx?user=admin
https://tstsps101:45775/test/document.doc?user=admin
What rule can be written to achieve this?
Makes sense. However say for example the my current redirection rule is as follows:
#Redirect all requests
RewriteCond Host: tstsps101\:45775
RewriteRule /test/.* https\://site.com/default.aspx [I,RP]
Now I want the redirect to stop if it contains 'user=admin' in the URL, for example:
https://tstsps101:45775/test/default.aspx?user=admin
https://tstsps101:45775/test/home.aspx?user=admin
https://tstsps101:45775/test/document.doc?user=admin
What rule can be written to achieve this?
Re: can i break the redirect?
kmann wrote:Makes sense. However say for example the my current redirection rule is as follows:
#Redirect all requests
RewriteCond Host: tstsps101\:45775
RewriteRule /test/.* https\://site.com/default.aspx [I,RP]
Now I want the redirect to stop if it contains 'user=admin' in the URL, for example:
https://tstsps101:45775/test/default.aspx?user=admin
https://tstsps101:45775/test/home.aspx?user=admin
https://tstsps101:45775/test/document.doc?user=admin
What rule can be written to achieve this?
Try this:
RewriteCond Host: tstsps101\:45775
RewriteRule /test/(?![^?]*\?user=admin).* https\://site.com/default.aspx [I,RP]
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 8 guests