Page 1 of 1
whole request in mod_rewrite
Posted: Thu Nov 02, 2006 6:57 pm
by Luke
I'm sorry... I've searched everywhere... maybe I'm just a moron... I know you can get the request url with %{REQUEST_URI} in mod_rewrite, but how do you get the entire URI? I need to test if somebody came in on
https://www.mysharedhost.com/mysite or
http://www.mysite.com
How could I Do that??
Re: whole request in mod_rewrite
Posted: Fri Nov 03, 2006 4:46 am
by Chris Corbyn
The Ninja Space Goat wrote:I'm sorry... I've searched everywhere... maybe I'm just a moron... I know you can get the request url with %{REQUEST_URI} in mod_rewrite, but how do you get the entire URI? I need to test if somebody came in on
https://www.mysharedhost.com/mysite or
http://www.mysite.com
How could I Do that??
You don't read that.
Use "RewriteCond %{HTTPS} !=On" if I remember correctly. For some reason we needed to hack our apache config to do "setenv HTTPS 'On'" for the directories we use HTTPS on, although I think that was just for Trac since we run it over CGI.
Posted: Fri Nov 03, 2006 5:08 am
by Jenk
%{HTTP_HOST} is available to rewrite cond's.
Posted: Fri Nov 03, 2006 3:26 pm
by Luke
I have a site that people will normally come to by way of
http://store.mysite.com/page/PAGECODE which rewrites to
http://store.mysite.com/merchant2/merch ... re_Code=BS
When they come to the store via the shard secure server... they come in by way of
https://www169.sharedsecureserver.com/page/PAGECODE which is supposed to be rewritten to
https://www169.sharedsecureserver.com/m ... re_Code=BS
I can't get the secure part to work... I've tried a number of different things... how should I be tackling this thing?