RewriteRule更改网址

时间:2013-10-03 09:44:16

标签: regex .htaccess mod-rewrite

您好我想用RewriteRule更改网址,比如

http://www.myweb.com/camisetas/something.html

http://www.myweb.com/catalogo/something.html

something.html是可变的。

由于

2 个答案:

答案 0 :(得分:0)

您可以使用此规则:

RewriteEngine On
RewriteRule ^camisetas/(.+)$ /catalogo/$1 [L,NC,R=301]

答案 1 :(得分:0)

尝试将其放入.htaccess文件中:

RewriteEngine ON
RewriteRule ^/camisetas/(.*)$ http://www.myweb.com/catalogo/$1 [R=301,L]