I'm really not sure if this is possible; what I want is to redirect people who visit http://www.source.tld like this;
RewriteEngine on
RewriteRule ^(.*)$ http://www.destination.tld/splash.php$1 [R=301]
But the flaw with this rule is that the URL is also changed. Is it possible to redirect a user without changing the URL and without using a 100% sized frame?
I don't want to use a frame because the splash.php page is supposed to get the referrer etc and store these in a DB. There are a lot of source domains and I don't want to upload a hundred files when anything changes.
mod_rewrite - redirecting without changing the URL
Moderator: General Moderators
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Ok, why doesn't the following work?
RewriteEngine on
RewriteCond %{REMOTE_ADDR} !(^87\.244\.[0-2][0-9][0-9]\.[0-2][0-9][0-9]$) [NC]
RewriteRule ^(.*)$ http://www.url.tld/splash.php$1 [R=301,L]
The plan is to NOT redirect anyone in the specified IP range to the splash page...
I checked the Regex using the Regex Coach so that shouldn't be the problem.
RewriteEngine on
RewriteCond %{REMOTE_ADDR} !(^87\.244\.[0-2][0-9][0-9]\.[0-2][0-9][0-9]$) [NC]
RewriteRule ^(.*)$ http://www.url.tld/splash.php$1 [R=301,L]
The plan is to NOT redirect anyone in the specified IP range to the splash page...
I checked the Regex using the Regex Coach so that shouldn't be the problem.