Answer the question
In order to leave comments, you need to log in
Do I need a redirect from /index.php to /index? How to implement?
Changed links in .htacces from /index.php to /index Do I need to redirect to avoid clones in indexing? If yes, how?
AddDefaultCharset utf-8
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
Answer the question
In order to leave comments, you need to log in
It is better to glue index.php to the root of the site
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ https://site.com/ [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question