homepage Welcome to WebmasterWorld Guest from 54.197.147.90
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
Rewrite directive inside <VirtualHost>
it doesn't work without the [R] flag. why?
Finder




msg:911587
 9:39 pm on Aug 11, 2003 (gmt 0)

RewriteRule /foo.html /?section=foo [L]

That rule works fine if it's declared globally and there are no virtual hosts. As soon as I create a virtual host, I have to use the [R] flag or it won't work (I just get a 404).

I like it without the flag because then the real URL is hidden from users.

For example, the above would display as:
www.mydomain.com/foo.html

But with the [R] flag it shows up as:
www.mydomain.com/?section=foo

Kind of defeats the purpose of using rewrite... Any help on this?

 

msr986




msg:911588
 3:14 am on Aug 12, 2003 (gmt 0)

I am confused by what you are trying to do.

I don't think you have a file on your server named '/?section=foo', so the 404 is correct.

What is the pathname of the file you want to send to the user?

Finder




msg:911589
 5:12 am on Aug 12, 2003 (gmt 0)

My site is PHP-enabled, so /?section=foo resolves to a standard html page.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
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