重定向网址.htaccess,多个链接

时间:2013-07-09 14:39:33

标签: .htaccess url redirect

所以我有15个不同的链接,我想重定向到其他15个不同的链接

示例

example.com/example/example.html -> example.com/example_new/example_new.html example.com/example1/example1.html -> example.com/example1_new/example1_new.html example.com/example2/example2.html -> example.com/example2_new/example2_new.html example.com/example3/example3.html -> example.com/example3_new/example3_new.html example.com/example4/example4.html -> example.com/example4_new/example4_new.html example.com/example5/example5.html -> example.com/example5_new/example5_new.html example.com/example6/example6.html -> example.com/example6_new/example6_new.html ...



如何用.htaccess做到这一点?

谢谢! :)

1 个答案:

答案 0 :(得分:0)

使用Redirect指令:

Redirect 301 /example/example.html /example_new/example_new.html
Redirect 301 /example1/example1.html /example1_new/example1_new.html