Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-08-2012, 01:10 AM   PM User | #1
gnznroses
New Coder

 
Join Date: Sep 2002
Posts: 61
Thanks: 3
Thanked 1 Time in 1 Post
gnznroses is an unknown quantity at this point
Question [solved] Referring URL blanked by mod_rewrite?

I have a rewrite to make mydomain.com/123 load the script at mydomain.com/links.php?id=123

links.php generates html with some links on the page. the links are supposed to have the referring url appended to them in the query string ( eg http://whatever.com/s.php?ref=<?=$_SERVER['HTTP_REFERER'];?> ), but it's always blank no matter what.

would the rewrite cause HTTP_REFERER to be blanked out? what else might cause this?


Code:
RewriteEngine on
Options +FollowSymlinks

RewriteCond %{HTTP_HOST} ^www\.mydomain.com [NC]
RewriteRule ^(.*) http://mydomain.com/$1 [L,R=301]
RewriteCond %{REQUEST_URI} !^/$
RewriteCond %{REQUEST_URI} !^/links\.php
RewriteCond %{REQUEST_URI} !^/robots\.txt
RewriteRule ^(.*)$ links.php?id=$1 [L]

Last edited by gnznroses; 02-08-2012 at 06:43 AM..
gnznroses is offline   Reply With Quote
Old 02-08-2012, 06:42 AM   PM User | #2
gnznroses
New Coder

 
Join Date: Sep 2002
Posts: 61
Thanks: 3
Thanked 1 Time in 1 Post
gnznroses is an unknown quantity at this point
hmm, ignore this. just a case of odd browser behavior not passing a referring urls when i use a link on pastehtml. passes just fine on a real test page on my domain
gnznroses is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:48 PM.


Advertisement
Log in to turn off these ads.