I have a website, I need to display ONLY the home page instead of an actual URL being request (website is work in progress).
Any urls within that domain should be rewritten to index.html and only index.html should be visible in the entire website.
How to write the rules in my current script?
Notes: I am not interested on the SEO impact.
RewriteEngine on
# SECURITY : Directory Listing denied
options -indexes
# UTILITY : Redirect WebMail
redirect permanent /email http://www.example.com:2095/3rdparty/roundcube/index.php?
RewriteCond %{HTTP_HOST} ^example.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.example.com$
RewriteRule ^/?$ "http://www.example.com/" [R=301,L]
3
Answers
I was able to solve my problem with the following code
RewriteEngine on
RewriteRule ^.+$ /index.html [L]
Try this
You can have your .htaccess like this: