homepage Welcome to WebmasterWorld Guest from 54.161.202.234
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
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
scorpion




msg:1518606
 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:
'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




msg:1518607
 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