【发布时间】:2014-10-21 12:02:30
【问题描述】:
我正在关注重写规则广告
RewriteEngine On
RewriteCond ${REQUEST_URI} ^.+$
RewriteCond %{REQUEST_FILENAME} \.(gif|jpe?g|png|js|css|swf|php|ico|txt|pdf|xml)$ [OR]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -l
RewriteRule ^ - [L]
RewriteRule ^(.*)/(.*)/?$ index.php?rt=$1/$2 [L]
RewriteRule ^(.*)/(.*)/(.*)/?$ index.php?rt=$1/$2/$3 [L]
如果 URL 像 http://www.example.com/manage/ne/new?query=123 means 一样,我将继续使用 php 中的“$_GET”获取在 url 中传递的“查询”的值。
它像`http://www.example.com/index.php?rt=manage/ne/new一样重定向
但我需要的是http://www.example.com/index.php?rt=manage/ne/new&query=123
谁能帮我解决这个关于 Htacces 的问题。
【问题讨论】:
标签: php apache .htaccess mod-rewrite redirect