Welcome to WebmasterWorld Guest from 50.19.135.67

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

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

     

Jesse_Smith

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

WebmasterWorld Senior Member 10+ Year Member



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.

vincevincevince

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

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



Take the L out of the first line

abates

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

10+ Year Member



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]

Jesse_Smith

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

WebmasterWorld Senior Member 10+ Year Member



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!

Jesse_Smith

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

WebmasterWorld Senior Member 10+ Year Member



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]

 

Featured Threads

Hot Threads This Week

Hot Threads This Month