0

I'm trying to do a 301 redirect using .htaccess file to redirect:

http://www.mydomain.com/index.php?/knowledgebase/

To:

http://www.mydomain.com/knowledgebase/

Ive tried about 30 different redirect/rewrite suggestions but none work, can anyone provide the specific .htaccess setting I need please?

4

1 回答 1

1

您可以像这样使用mod_rewrite执行此操作:

RewriteCond %{QUERY_STRING} ^/knowledgebase/$
RewriteRule ^index.php$ /knowledgebase/ [L,R=301]

编辑:在调试 htaccess 重写规则时,我发现这个工具非常有用

于 2013-08-13T22:50:45.713 回答