Cannot Remove index.php from URL
-
Greetings,
I host several WP sites on my server, and each one will not suppress index.php in the URL. If I attempt to navigate to a page without it, I get a 404 error.
The .htaccess file normally contains this (default):
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>I have tried setting the permalinks to /%postname%/ with the following in .htaccess, based on doing some searching.
<IfModule mod_rewrite.c> RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^/(.*)$ /index.php/$1 [NC,L] </IfModule>However, this still results in 404 errors. It is as if the .htaccess file is being ignored.
Also, .htaccess does not get updated following any permalink changes from within WP. I am not sure whether it should be updating. The permissions are 644 and is owned by the account username.
Thank you,
Michael Reynolds
The topic ‘Cannot Remove index.php from URL’ is closed to new replies.