由于斜线问题,我的部分页面出现重复。 E.g socktail.com/shop
和socktail.com/shop/
重复且可访问。 请让我知道如何解决这个问题。我是网络技术新手,甚至不知道我的.htaccess文件是否正常。
以下是我的.htaccess的内容,由于尾部斜线造成的重复页面
RewriteEngine On
RewriteBase/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|javascript|images|robots\.txt)
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(([a-z0-9_]+\.)?socktail\.com)$ [NC]
RewriteRule .? {REQUEST_URI} [R=301,L]