How would I accomplish the following via mod rewrite in the .htaccess
http://www.example.com/foo/test.php => http://www.example.com/foo
Also, this rewrite does not need to be reflected in the browser’s address bar, i.e. doesnt need to be a redirect.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To match exactly it would look like this:
If you want to match against only the test.php part, it would look like this:
Either rule will take a request
www.example.com/foo/test.phpand internally rewrite it to/fooand serve /foo to the browser.