doushao1087 2016-11-02 09:04
浏览 13

htaccess rewriteRule http://example.com/之间有什么区别? 和http://example.com/index.php?

I am interested to avoid a redirection in case of the query string contains a specific format: ?a_aid So i use this code in the .htaccess file

RewriteCond %{QUERY_STRING}  !^a_aid[NC]
RewriteRule ^([a-zA-Z0-9_-]*)$ /index.php?a=$1 [L]

My problem is that it works for the URL:
http://example.com/index.php?a_aid=
but not for the URL:
http://example.com/?a_aid=

Any idea how to support both of them ???

  • 写回答

0条回答 默认 最新

    报告相同问题?