Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

rewrite rules breaking down



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:

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...


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.

Featured Threads

Hot Threads This Week

Hot Threads This Month