Welcome to WebmasterWorld Guest from 50.17.16.177

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

RewriteRule ^(.*)$ redirect and index page trouble.

     
11:52 pm on Aug 9, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 5, 2003
posts:807
votes: 0


Is there any way to have this code not mess up the index page?

RewriteRule ^(.*)$ http-//$1.id.hop.domain.net [R=301,L]
RewriteRule ^$ index.shtml [L]

it redirects to

http-//.id.hop.domain.net/

instead of showing the index.shtml file.

12:04 am on Aug 10, 2006 (gmt 0)

Senior Member from MY 

WebmasterWorld Senior Member vincevincevince is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 1, 2003
posts:4847
votes: 0


Take the L out of the first line
12:19 am on Aug 10, 2006 (gmt 0)

Full Member

10+ Year Member

joined:Aug 22, 2003
posts:333
votes: 0


Change those to lines to:

RewriteCond %{REQUEST_URI}!index.shtml$ [NC]
RewriteRule ^(.*)$ http-//$1.id.hop.domain.net [R=301,L]

You could probably throw the following line in just to make sure:
RewriteCond %{REQUEST_URI}!=/ [NC]

12:38 am on Aug 10, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 5, 2003
posts:807
votes: 0


That then shows the index page at affiliates.domain.com and affiliates.domain.com/index.shtml but doesn't do the redirect at affiliates.domain.com/whatever

Just taking the L out of the first line made the browser go bonkers, searching and then redirecting to some other site!

1:45 am on Aug 10, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 5, 2003
posts:807
votes: 0


RewriteRule ([0-9a-zA-Z]+)$ http-://$1.id.hop.domain.net [R=301,L]

works.

[edited by: Jesse_Smith at 1:45 am (utc) on Aug. 10, 2006]