Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要将 SMF 论坛系统的旧网址重定向到新的 Xenforo。旧网址是:
http://www.example.com/forum/index.php?topic=XXXX.0
新的网址是:
http://www.example.com/forum/threads/XXXX/
什么是真正的 htaccess 代码?
这应该可行,尽管它假设您的线程在 SMF 和 XF 中具有相同的 ID。它应该放在 Xenforo 的重定向之前。
RewriteCond %{QUERY_STRING} ^topic=(\d+).*$ RewriteRule ^index\.php$ http://www.example.com/forum/threads/%1/? [R=302,L]