如何从这里重定向我的网站
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 请检查。 我无法添加代码,因此将其粘贴到 pastebin 中
启用mod_rewrite
并通过httpd.conf
.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]