Please help me figure it out.
on type pages
site.com/?abrakadabra
site.com/articles?abrakadabra
site.com/galleries/arbors?sgfds
The server gives the answer 200 and created duplicate pages in the Google index, you need to correctly make 301 redirects from the pages
site.com/?abrakadabra on site.com
site.com/articles?ljuboj_tekst at site.com/articles
prescribed so
RewriteBase / RewriteRule ^([^\?]+)\? $1 [L] RewriteRule (.*) $1 [L,R=permanent] so
RewriteCond %{QUERY_STRING} ^.*$ [NC] RewriteRule (.*) $1? [R=301,L] so
RewriteCond %{QUERY_STRING} ^.+$ RewriteRule ^(.*)$ /$1? [l,r=301] as a result of a forwarding loop.
maybe some kind of mistake or i am doing something wrong. Htaccess file:
Options +FollowSymLinks Options -Indexes RewriteEngine on RewriteCond %{HTTP_HOST} ^www.host.com$ [NC] RewriteRule ^(.*)$ http://host.com/$1 [L,R=301] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^/admin/ RewriteCond %{REQUEST_URI} ^(.+)/$ RewriteRule ^(.+)/$ /$1 [R=301,L] #RewriteCond %{REQUEST_FILENAME} -s [OR] #RewriteCond %{REQUEST_FILENAME} -l [OR] #RewriteCond %{REQUEST_FILENAME} -d #RewriteRule ^.*$ - [NC,L] RewriteRule ^(.*)\.tpl$ [R=404] RewriteRule ^(.*)\.zip$ [R=404] RewriteCond %{REQUEST_URI}::$1 !^(index\.php|user_guide|uploads/.*|favicon\.ico|favicon\.png|captcha/.*|application/modules/.*/templates|application/modules/.*/assets/js|application/modules/.*/assets/css|application/modules/.*/assets/images|CHANGELOG.xml|templates|js|robots\.txt|mpdf) RewriteRule ^(.*) - [E=BASE:%1] RewriteRule ^(.*)$ %{ENV:BASE}index.php?/$1 [NC,L]