Welcome to WebmasterWorld Guest from 54.163.23.73

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

rewrite rules breaking down

     

scorpion

8:27 pm on Dec 6, 2002 (gmt 0)

10+ Year Member



Can someone solve this?

1. I rewrite a toplevel domain to a subdirectory..

RewriteCond %{HTTP_HOST} [^.]*toplevel\.com$
RewriteCond %{REQUEST_URI}!^/server/toplevel/
RewriteRule ^(.*)$ /server/toplevel/$1 [L]

2. I type-in a directory without a index file...
e.g. toplevel.com/members (member's directory only contains one file members.htm and NO index files to load by default)

3. I get a forbidden error, but the real problem is the rewrite breaks down and the address bar reads:
'http://www.myactualserver.com/server/toplevel/members/'

How can I mask this so that the result shows
[toplevel.com...] and a forbidden msg...

I know it can be done cause someone did another site for me and it behaves as desired...

Brett_Tabke

3:50 am on Dec 9, 2002 (gmt 0)

WebmasterWorld Administrator brett_tabke is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Check the mod rewrite tutorial that's part of the mod_rewrite package. That exact example is in there a dozen times.