I have the following code in my htaccess file that is used to redirect all www URLs to non-www URLs. This works for all links except the root.
For example, http://www.noshon.it/recipes redirects properly to http://noshon.it/recipes. However, http://www.noshon.it incorrectly redirects to http://noshon.it/wordpress (where it receives a 404 page).
I can't figure out why all ULRs work except for the root. Any help would be much appreciated.
RewriteEngine On RewriteCond %{HTTP_HOST} ^www\\.noshon\\.it$ [NC] RewriteRule ^(.*)$ http://noshon.it/$1 [R=301,L] RewriteBase / RewriteRule ^index\\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]