Update
I think I just figured out what you are wanting to do. You see, you can pass queries behind the scenes, but you cannot pass what you are suggesting behind the scenes. You have to do an actual redirect. Something like this (The important part is the R
):
RewriteRule ^bar$ index.php/bar [NC,QSA,R]
This forces a redirect to your page using the new special path. Is that what you wanted?
Original Answer
You cannot pass a path to a PHP page like that as it will be interpreted as part of a path. Chances are, your file is on a Linux/Unix machine where a directory can be named with a .
in it. Sorry, but you will have to use a query string:
RewriteBase /
RewriteRule ^bar$ index.php?page=bar [NC,QSA]
Or updated:
RewriteBase /
RewriteRule ^bar$ index.php?/bar [NC,QSA]
I also think the last few versions of windows support .
in directories as well, but I am not sure.