0
我有一個搜索功能來查找產品,還我已啓用內.htaccess
PHP的問題,同時發送與國防部重寫形式得到啓用
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteRule ^([A-Za-z0-9_-]+)$ /index.php?go=$1
RewriteRule ^([A-Za-z0-9_-]+)/([A-Za-z0-9_-]+)$ /index.php?go=$1&action=$2
RewriteRule ^([A-Za-z0-9_-]+)/([A-Za-z0-9_-]+)/([A-Za-z0-9_-]+)$ /index.php?go=$1&action=$2&do=$3
RewriteRule ^([A-Za-z0-9_-]+)/([A-Za-z0-9_-]+)/([A-Za-z0-9_-]+)/([A-Za-z0-9_-]+)$ /index.php?go=$1&action=$2&do=$3&id=$4
國防部重寫的事情是,當我做了搜索像https://www.server.com/search?search=try+search
這樣做時,它不顯示任何結果:
echo $_GET['search'];
但如果我這樣做https://www.server.com/?go=search&search=try+search
然後它完美的作品,所以我看到的問題是重寫,但我不能修復它。
有什麼建議嗎?
感謝
使用標誌'QSA' - > HTTP://的httpd。 apache.org/docs/current/rewrite/flags.html#flag_qsa – tttony 2014-09-03 00:09:12
感謝您的評論,我該如何使用該標誌? – 2014-09-03 00:10:48
看鏈接 - > http://httpd.apache.org/docs/current/rewrite/flags.html#flag_qsa – tttony 2014-09-03 00:11:16