Reputation: 586
When I open my website http://www.codersvolt.com, It redirects to http://www.codersvolt.com/index/ instead of http://www.codersvolt.com/index.php and It should show only http://www.codersvolt.com URL.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteRule . index.php [L]
</IfModule>
RedirectMatch 301 (.*)\.html$ http://www.codersvolt.com$1/
I am redirecting pages with .html extension to pages without .html extension, Which works fine, but causing above home page issue.
Upvotes: 1
Views: 81
Reputation: 41219
Try this :
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^$ index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteRule . index.php [L]
</IfModule>
RedirectMatch 301 (.*)\.html$ /$1/
Upvotes: 1