Fabian Lurz
Fabian Lurz

Reputation: 2039

What is wrong with this .htaccess? Too many redirects on Safari

can someone pls say me where my .hatcess has a problem?

RewriteEngine On

RewriteRule \.(css|jpeg|jpg|gif|png|js|json|eot|svg|ttf|woff|txt|xml|ico)$ - [L]
RewriteRule . core/FrontController.class.php [L]

RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

Redirect 301 /index http://eese.com

The problem: Safari says i have to many redirects (Just go to http://eese.com)

Upvotes: 1

Views: 688

Answers (1)

anubhava
anubhava

Reputation: 785781

Don't use Redirect rule with your mod_rewrite rules. Change your .htaccess to:

RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

RewriteRule ^index/?$ / [L,R=301,NC]

RewriteRule \.(css|jpeg|jpg|gif|png|js|json|eot|svg|ttf|woff|txt|xml|ico)$ - [L]
RewriteRule . core/FrontController.class.php [L]

Test this out after clearing your browser cache.

Upvotes: 1

Related Questions