I have two questions regarding RewriteRule, but they're both closely related so I hope it's OK I ask them both in a single post.
The first is that I'd like to strip trailing index.html
's from the end of any URL, e.g.:
http://www.example.com/index.html -> http://www.example.com/
The second is to display the URL http://www.example.com/contact/
in the browser's address bar for all of the following URLs:
http://www.example.com/contact/
http://www.example.com/contact/index.html
http://www.example.com/contact/success.html
http://www.example.com/contact/failure.html
For example, if the user is redirected to http://www.example.com/contact/success.html
I'd like that page to be displayed to them, but with http://www.example.com/contact/
as the URL. Is that possible?