homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

Inserting referer before redirect

 1:13 pm on Jul 19, 2009 (gmt 0)

I have a few sites where some pages are redirected (RewriteRule - 301) to a single one on another site.
The problem is that I can't find a way to find out from which site the page is being redirected, as the redirecting referer is not passed through.
I have tried almost everything related to mod-headers without success.
Any ideas?



 3:07 pm on Jul 19, 2009 (gmt 0)

The HTTP_Referer header is sent by HTTP clients, so your server can't send it in a redirect.

Consider appending the information to the URL as a query string (or perhaps as a fragment), and then the target site can retrieve it:

RewriteRule ^my-page$ http:othersite.com/single-page?ReferredBy=my-page



 3:20 pm on Jul 19, 2009 (gmt 0)

Yes I can add an extra QS as url's already include other queries, but I would prefer referrer solution which seemingly can't be done.

Thanks Jim.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved