homepage Welcome to WebmasterWorld Guest from 23.22.252.150
register, login, search, subscribe, help, library, PubCon, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Visit PubCon.com
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
referer
activeco




msg:3955281
 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?

 

jdMorgan




msg:3955296
 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

Jim

activeco




msg:3955301
 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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
WebmasterWorld ® and PubCon ® are a Registered Trademarks of Pubcon Inc.
© Pubcon Inc. 1996-2012 all rights reserved