【发布时间】:2014-06-30 13:51:02
【问题描述】:
我有很多以下格式的网址。
index.php?option=com_letflat&task=view&id=42
index.php?option=com_letflat&task=view&task=ajaxmap
我想将所有包含option=com_letflat的url重写为域的根,即http://www.example.com
我尝试了几十种不同的方法,但似乎都没有奏效。 我已经做到了:
RewriteCond %{QUERY_STRING} (^|&)option=com_letflat [NC]
RewriteRule ^index.php(.*) http://www.example.com [R=301,L]
但它不起作用。
谢谢
【问题讨论】:
标签: regex apache .htaccess mod-rewrite