homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

rewrite rules breaking down

10+ Year Member

Msg#: 62 posted 8:27 pm on Dec 6, 2002 (gmt 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...



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

Msg#: 62 posted 3:50 am on Dec 9, 2002 (gmt 0)

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

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved