11 Aug 2010 21:48
Apache Redirect
I'm hoping theres an Apache guru lurking somewhere on this list. Here's what I'd like to do. Consider the following setup: www.example.com/picker.php www.example.com/path/foo.php www.example.com/path/bar.php www.example.com/path/baz.php What I'd like to do is give out either of the following URLs: www.example.com/path/foo www.example.com/foo and have Apache internally redirect to the appropriate path/file combination, so /path/foo.php, regardless of what case the url was typed in (it should always be looking for lowercase file names). There will never be a physical 'foo' or 'foo.php' file inside of the ROOT. So I don't have to worry about there being an actual link there. And lastly, for any that does not resolve (say someone typed in a non- existing file), it should redirect to the /picker.php file. Note, this is not the same as setting the ErrorDocument - there is another file handling that.
RSS Feed