WordPress Overriding htaccess?
-
I need to redirect all my .html pages to the corresponding .php page. Everywhere I’ve looked suggests that the following .htaccess code should do it:
RewriteEngine On
RewriteRule ^(.*).html$ $1.php…But it’s not working. When someone goes to an .html page (that has a corresponding .php page), they get a 404 error.
Is there anything in the WordPress software, or its htaccess code, that could be preventing this line of code from working?
Below is my full .htaccess file, FWIW:
RewriteEngine On
# Redirect any .html pages to the corresponding .php page
RewriteRule ^(.*).html$ $1.php
# add www to the domain name if it's not already there
RewriteCond %{HTTP_HOST} ^muditajournal.com [nc]
RewriteRule (.*) https://www.muditajournal.com/$1 [R=301,L,nc]# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
- The topic ‘WordPress Overriding htaccess?’ is closed to new replies.