我的网站正在使用非www网址运行,当我打开任何带有www in url的内部页面时,它会将我重定向到主页。
我在顶部对 .htacess 进行了以下更改
RewriteCond %{HTTP_HOST} ^www.test.in [NC]
RewriteRule ^(.*)$ http://test.in/$1 [L,R=301]
但没有用,
我还设置了从管理员自动重定向到基本 URL 到否
有人可以给我解决方案,如何将 www 重定向到主页和内页的非 www URL,而无需将内页重定向到主页
RewriteCond %{HTTP_HOST} ^www.test.in [NC]重写规则 ^(.*($ http://test.in/$1 [L,R=301]
它会
是这样的
RewriteCond %{HTTP_HOST} ^www.test.in$ [NC]
RewriteRule ^(.*) http://test.in/$1 [L,R=301]