2013-11-04 46 views
0

我如何可以重定向我的网站从这个htaccess的从一个链接改写到另一条链路同一个目录

http://www.mysite.org/forum/posts/129731/ 

http://www.mysite.org/forum/showthread.php?p=129731 

http://www.mysite.org/forum/threads/hey-yall.12875 

http://www.mysite.org/forum/showthread.php?t=12875 

感谢

编辑:

http://pastebin.com/La5Vf5vH 

新增htaccess的请。我无法添加代码,以便粘贴它在引擎收录

回答

0

启用通过httpd.confmod_rewrite.htaccess(如果尚未启用),然后把这个代码在你DOCUMENT_ROOT/.htaccess文件:

RewriteEngine On 

RewriteRule ^(forum)/posts/([0-9]+)/?$ /$1/showthread.php?p=$2 [L,QSA,NC] 

RewriteRule ^(forum)/threads/(?:[^.]+\.)?([0-9]+)/?$ /$1/showthread.php?t=$2 [L,QSA,NC] 
+0

获取内部服务器错误 – user2951768

+0

我错过了右括号,现在检查已编辑的代码。 – anubhava

+0

现在404错误:P – user2951768

相关问题