开发者

redirect old PHPBB link to new link structure

开发者 https://www.devze.com 2023-04-11 01:11 出处:网络
I have an old PHPB forum with a lot of posts with links to other posts that look like this: http://link.com/viewtopic.php?f=40&t=1628&p=9062#p9062

I have an old PHPB forum with a lot of posts with links to other posts that look like this: http://link.com/viewtopic.php?f=40&t=1628&p=9062#p9062 Now the problem is that the new forum is at /for开发者_如何学Pythonum so the link should be: http://link.com/forum/viewtopic.php?f=40&t=1628&p=9062#p9062

Is there any way to automaticaly redirect the user, using .htacces for example? but only when viewtopic.php gets accesed?

Thank you for your suggestions!


RewriteEngine on
RewriteRule ^/viewtopic.php(.*) /forum/viewtopic.php$1 [R=301]


I used RedirectPermanent /viewtopic.php /forum/viewtopic.php

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号