Answer the question
In order to leave comments, you need to log in
How to remove page duplicate from index.php?
Hello everyone, there is a problem
search engines have started to have duplicate pages
site/index.php/category...
site/category/1/333
How to remove index.php from the middle?
a redirect from index.php to / is done, but not when it is in the middle of the url
in the same way as in request 2, make a redirect to site/category/1 (that is, remove 333)
Please tell me, I can’t figure it out, I will be very grateful
UPD
Now so htaccess looks like:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule (.+)/$ /$1 [L,R=301]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://xn----7sbbcusc3afgldd9b0a7j\.com [R=301,L]
RewriteCond "%{HTTP_HOST}" "!^xn----7sbbcuc3afgl9b0a7j\.com" [NC]
RewriteRule "^/?(.*)" "http://xn----7sbbcusc3afgldd9b0a7j\.com/$1" [L,R,NE]
</IfModule>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question