Server: Apache
I’m looking to rewrite my urls in the following way, and I can’t figure out a way to get it to work.
http://website.com/index.html
I want it to redirect to:
http://website.com/
So basically I want to load index.html, but not display it in the url. I also don’t want to give it another name. I’m not looking for /index.html to become /index
Additionally, I’m trying to have any GET data such as:
http://website.com/index.html?id=0&name='fred'
To rewrite to:
http://website.com/?id=0&name='fred'.
If you have a solution that is not using .htaccess files that’s fine as well.
I believe this should work:
This will redirect any requests that start with
/index.htmlto simply ‘/‘ and will preserve any arguments that come afterindex.html