2012-06-09 18 views
0

我們從一個論壇提供者轉到我們自己的論壇和主持。 老論壇使用的index.cgi?行動= 有些時候是的index.cgi?行動=自拍&用戶= USERNAME 等.....htaccess從index.cgi改寫?action = to/or index.php

我想重定向任何的index.cgi?行動=請求到http://www.example.com/或index.php文件

此外,我想重定向:拼寫/ spellchecker.html到http://www.example.com/或index.php文件

所有重定向,我想是301

誰能幫助?

感謝

+0

你想重定向'index.cgi?action = viewprofile'到'index.php?action = viewprofile'或只是'index.php'? – Christopher

+0

只是index.php或重定向到http://www.example.com – Garry

回答

2

我希望這會爲你工作:

RewriteEngine on 
RewriteBase/

RewriteCond %{QUERY_STRING} action 
RewriteRule index\.cgi http://www.example.com [L,R=301] 

RewriteRule speller/spellchecker.html http://www.example.com [L,R=301] 

到的index.cgi含action將被重定向的每個請求,每個請求的拼寫/ spellchecker.html了。

+0

謝謝,早上會試試看。 – Garry

+0

不客氣 – Christopher