whole request in mod_rewrite

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

whole request in mod_rewrite

Post 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??
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: whole request in mod_rewrite

Post 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.
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

%{HTTP_HOST} is available to rewrite cond's.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post 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?
Post Reply