2
我有下面的代码工作正常国防部重写htaccess的与寻呼系统
RewriteRule ^articles/([^/\.]+)/?$ articles.php?pid=$1 [L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+articles\.php\?pid=([^\s&]+) [NC]
RewriteRule^http://www.mydomain.com/articles/%1? [R=301,L]
的问题是,我有一个分页体制与我送另一个变量到该页面为我的寻呼系统,看起来像这样
&pageNum_getArticles=1#1
我已经尝试做以下,但会随哈希混淆,我认为
RewriteRule ^articles/([^/\.]+)/?$ articles.php?pid=$1&pageNum_getArticles=$2 [L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+articles\.php\?pid=([^\s&]+)&pageNum_getArticles=([^\s&]+) [NC]
RewriteRule^http://www.mydomain.com/articles/%1/%2? [R=301,L]
散列是一个URL片段,它从来没有发送到服务器,因此它不应该出现在'%{} THE_REQUEST'变量。该片段完全在浏览器的末端处理。 – 2013-02-27 07:24:34
感谢您的信息。那么是否有解决方案或我必须更改分页系统? – Neos 2013-02-27 07:28:01