Welcome to WebmasterWorld Guest from

Forum Moderators: bakedjake

Message Too Old, No Replies

Rewrite directive inside <VirtualHost>

it doesn't work without the [R] flag. why?



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

10+ Year Member

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?


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

WebmasterWorld Senior Member 10+ Year Member

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?


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

10+ Year Member

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

Featured Threads

Hot Threads This Week

Hot Threads This Month