對不起我的英文不好。如何編寫htaccess重定向我的網站?
我使用SMF來運行我的論壇。
這是老論壇URL =>hxxp://www.mysite.com/
但現在,我將我的論壇, 「論壇」 文件夾=>hxxp://www.mysite。 COM /論壇/
谷歌等搜索引擎收錄我的網站網址:hxxp://www.mysite.com/index.php話題= 99.0
而當用戶去hxxp ://www.mysite.com/index.php?topic = 99.0,找不到。
因爲他必須去hxxp://www.mysite.com/forum/index.php?topic = 99.0,對吧?
所以,我想從hxxp重定向URL ://www.mysite.com/index.php話題= 99.0 到hxxp://www.mysite.com/forum/index.php ?topic = 99.0
我該怎麼辦?我嘗試這個,但不工作。
RewriteEngine On
RewriteBase/
RewriteRule ^index.php?topic=([0-9]+).([0-9]+)$ forum/index.php?topic=$1.$2 [R]
請幫助我。
嘗試'^/index.php'而不是'^ index.php' – Zaffy