| Welcome to WebmasterWorld Guest from 220.127.116.11 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|Rewrite directive inside <VirtualHost>|
it doesn't work without the [R] flag. why?
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:
But with the [R] flag it shows up as:
Kind of defeats the purpose of using rewrite... Any help on this?
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?
My site is PHP-enabled, so /?section=foo resolves to a standard html page.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved