Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

rewrite rules breaking down

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

Preferred Member

10+ Year Member

joined:Aug 15, 2002
votes: 0

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)

Administrator from US 

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

joined:Sept 21, 1999
votes: 113

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

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members