Can anyone help me figure out why I am getting this error, below is my htaccess
RewriteEngine ON
RewriteRule ^(.*)\.php$ /$1 [R=301,L,END]
RewriteRule ^([^\.\/]+)$ /$1.php [QSA,L]
Can anyone help me figure out why I am getting this error, below is my htaccess
RewriteEngine ON
RewriteRule ^(.*)\.php$ /$1 [R=301,L,END]
RewriteRule ^([^\.\/]+)$ /$1.php [QSA,L]
Your first rule may not require END
but 2nd rule will definitely require END
flag to stop infinite redirection. You can use following rules in Apache 2.4:
RewriteEngine On
RewriteRule ^(.+)\.php$ /$1 [R=302,L,NE,NC]
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+?)/?$ $1.php [END]