简单的 301 重定向问题
Issue with simple 301 redirect
在我的 .htaccess 文件中,我有以下重定向:
Redirect 301 /concrete5-themes/street/ http://www.c5themes.co.uk/street-theme-for-concrete5/
但是,这会将您带到 http://www.c5themes.co.ukstreet
,这显然是错误的。
怎么了?
谢谢
戴夫
在 .htaccess 的顶部尝试一下:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^(www\.)?c5themes\.co\.uk$
RewriteRule ^concrete5-themes/street(.*) http://www.c5themes.co.uk/street-theme-for-concrete5/ [R=301,L]
示例输入:
http://www.example.co.uk/concrete5-themes/street/1/1
http://www.example.co.uk/concrete5-themes/street
重定向:
您可以在这里进行实验:http://htaccess.madewithlove.be/
在我的 .htaccess 文件中,我有以下重定向:
Redirect 301 /concrete5-themes/street/ http://www.c5themes.co.uk/street-theme-for-concrete5/
但是,这会将您带到 http://www.c5themes.co.ukstreet
,这显然是错误的。
怎么了?
谢谢 戴夫
在 .htaccess 的顶部尝试一下:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^(www\.)?c5themes\.co\.uk$
RewriteRule ^concrete5-themes/street(.*) http://www.c5themes.co.uk/street-theme-for-concrete5/ [R=301,L]
示例输入:
http://www.example.co.uk/concrete5-themes/street/1/1
http://www.example.co.uk/concrete5-themes/street
重定向:
您可以在这里进行实验:http://htaccess.madewithlove.be/