404 pages when index.php appended to the URL of a directory style permalinks URL
-
Permalinks work fine if the URL is correct.
For example, this type of URL works fine:
https://www.dogcollarsboutique.com/dog-collars-blog/dog-lifestyle/ten-tips-for-going-green-with-your-dog/However, sometimes I find 404 errors with this type of URL (index.php added to end).
https://www.dogcollarsboutique.com/dog-collars-blog/dog-lifestyle/ten-tips-for-going-green-with-your-dog/index.phpI don’t know where these are being generated, but I see them this way in Google Analytics as a visited page. I think they may be added by search engines, but I don’t know and think it may be pointless to try to stop them.
Rather I would like to accept a permalink URL of the directory style format when index.php is appended to it and go to the correct page with without generating a 404.
Does anyone know how to do this?
Site Info:
I have permalinks turned on with this structure:
/%category%/%postname%/This is my .htaccess
—————–
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /dog-collars-blog/
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /dog-collars-blog/index.php [L]
——————-Thanks,
Scott
- The topic ‘404 pages when index.php appended to the URL of a directory style permalinks URL’ is closed to new replies.