I never had this issue come up until a client told me about it. For example, if you have a site that forces www via htaccess, and you have index.php being removed - when you go to a particular page (domain.com/about) via non-www method it’ll throw index.php in the loop.
Here’s what my htaccess looks like:
RewriteEngine On
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ <a href="http://www.%{http_host}/$1">http://www.%{http_host}/$1</a> [R=301,L]
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "A2592000"
ExpiresByType image/jpeg "A2592000"
ExpiresByType image/gif "A2592000"
ExpiresByType image/png "A2592000"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType text/javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "A2592000"
ExpiresDefault "access 2 months"
</IfModule>
## EXPIRES CACHING ##
# gzip compression.
<IfModule mod_deflate.c>
# html, txt, css, js, json, xml, htc:
AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript
AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
# webfonts and svg:
<FilesMatch "\.(ttf|otf|eot|svg)$" >
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>So again, when someone goes to http://www.domain.com/about everything works fine, but if they type domain.com/about it’ll load as domain.com/index.php?/about—- can’t figure how to remove index.php from the non forced www.