Topics: Developer Forum, User Forum
Nov 30, 2011 at 12:35 PM
Edited Dec 1, 2011 at 10:09 AM

Thanks for your time, whoever had tried to see this and provide solution. Seems to be working fine now.

I just had to remove the 'X' in the second line to make it "Referer:"  That was due to  limited knowledge on the usage of server variables.



I have an pre-existing binary application with .net 3.0 env; now have a need to manage few things. Basically there is a check in the app to check the http_referrer [reference url] for some authentication.

I need to rewrite the http_referrer [reference url] to remove few characters before app really gets executed.

Any suggestions, how this can be done.

i have many such needs like

if  http_referrer = url1 then make it url1a, if http refererr = url 2 then make it url2 etc.,

basically want to rewrite the value of the http_referer, not sure if RewriteHeader will allow me to rewrite value of http_referer, I've been trying but with no success.

sample rule is as below, with which i tried


RewriteCond %{HTTP_REFERER} ^http://localhost/isapyone/ [I]

RewriteHeader X-Referer: ^http://localhost/isapyone/Default.aspx$ http://localhost/isapyone/ [I,L] 


Environment is IIS 6 on win 2003

Please suggest an approach. Will be of great help.