You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Björn Lindström <bk...@elektrubadur.se> on 2004/03/07 15:36:38 UTC

[users@httpd] Trouble with mod_rewrite and referrers

It seems that somehow the rewrite rules in my .htaccess is throwing away
the referrer info, making it unavailable to the script (wrapper.pl).

Here is the entire .htaccess:

# Unicode for HTML
AddCharset UTF-8 .html

RewriteEngine On

# If there's no query string, change the page name part into a query.
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^([^/]+)$ /cgi-bin/wrapper.pl?$1 [QSA,L]

# Otherwise, do a plain redirect.
RewriteRule ^$ /cgi-bin/wrapper.pl [QSA,L]

-- 
Björn Lindström <bk...@elektrubadur.se>
http://bkhl.elektrubadur.se/


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Trouble with mod_rewrite and referrers

Posted by Björn Lindström <bk...@elektrubadur.se>.
Joshua Slive <jo...@slive.ca> writes:

> On Tue, 16 Mar 2004, Björn Lindström wrote:
>
>> Is there really nobody on this list with an idea about this:
>>
>> bkhl@elektrubadur.se (Björn Lindström) writes:
>>
>> > It seems that somehow the rewrite rules in my .htaccess is throwing away
>> > the referrer info, making it unavailable to the script (wrapper.pl).
>
> have you looked at the REDIRECT_REFERER env variable?

No, and I can't find it in the docs. Would you care to give a pointer?
(Or just say what I should set it to, if it's uncomplicated.)

-- 
Björn Lindström <bk...@elektrubadur.se>
http://bkhl.elektrubadur.se/


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Trouble with mod_rewrite and referrers

Posted by Joshua Slive <jo...@slive.ca>.
On Tue, 16 Mar 2004, Björn Lindström wrote:

> Is there really nobody on this list with an idea about this:
>
> bkhl@elektrubadur.se (Björn Lindström) writes:
>
> > It seems that somehow the rewrite rules in my .htaccess is throwing away
> > the referrer info, making it unavailable to the script (wrapper.pl).

have you looked at the REDIRECT_REFERER env variable?

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Trouble with mod_rewrite and referrers

Posted by Björn Lindström <bk...@elektrubadur.se>.
Is there really nobody on this list with an idea about this:

bkhl@elektrubadur.se (Björn Lindström) writes:

> It seems that somehow the rewrite rules in my .htaccess is throwing away
> the referrer info, making it unavailable to the script (wrapper.pl).
>
> Here is the entire .htaccess:
>
> # Unicode for HTML
> AddCharset UTF-8 .html
>
> RewriteEngine On
>
> # If there's no query string, change the page name part into a query.
> RewriteCond %{QUERY_STRING} ^$
> RewriteRule ^([^/]+)$ /cgi-bin/wrapper.pl?$1 [QSA,L]
>
> # Otherwise, do a plain redirect.
> RewriteRule ^$ /cgi-bin/wrapper.pl [QSA,L]
>
> -- 
> Björn Lindström <bk...@elektrubadur.se>
> http://bkhl.elektrubadur.se/
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
-- 
Björn Lindström <bk...@elektrubadur.se>
http://bkhl.elektrubadur.se/


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org