我需要做301重定向的100多个URL,这样不知道是否有可能使用串联的URL,这样我就不必在每一种类型。
I need to do 301 redirects on 100+ urls so was wondering if it's possible to use concatenation on the urls so that i don't have to type in every single one.
示例URL将类似于以下内容:
Sample urls would be similar to the following:
www.mysite.co.uk/ThisCategory/ThisSubCategory/reviews
www.mysite.co.uk/AnotherCategory/AnotherSubCategory/reviews
www.mysite.co.uk/YetAnotherCategory/YetAnotherSubCategory/reviews
我敢肯定有一种方法,只是采取任何网址开头www.mysite.co.uk/和/审查结束,但我不明白。
I'm sure there is a way to just take any url beginning with www.mysite.co.uk/ and ending in /reviews but i can't figure it out.
将下面的的htaccess
在根级:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.mysite.co.uk$ [NC]
RewriteRule ^(.*)/reviews/?$ http://new-web-page [R,L]
上一篇:所有子目录使用root index.php文件子目录、文件、index、root
下一篇:的.htaccess:"永久重定向和QUOT;回退到一个"重写规则"重写、退到、重定向、规则