简体   繁体   English

mod_rewrite URL随附加参数而变化

[英]mod_rewrite URL change with additional parameters

Struggling to get anything but simple rewrites to happen so I am hoping I can present a real example and get a sample so I can understand what I am doing wrong. 苦苦挣扎得到任何简单的重写,所以我希望我能提出一个真实的例子并得到一个样本,这样我才能理解我做错了什么。

This is the existing URL: 这是现有的URL:

Trying to change it to: 试图将其更改为:

What is interesting is I cant even "break" it to step through and see how my changes impact the rewrite. 有趣的是,我甚至无法“打破”它以逐步查看我的更改如何影响重写。 For example I would do: 例如,我会这样做:

RewriteRule ^reports/queue(.*)$ api/server/server.php$1 [R=301,NE,L] 

I actually expected this to provide a page not found but it doesn't seem to do anything. 我实际上期望这提供一个未找到的页面,但似乎没有做任何事情。 I have verified that mod_rewrite is working by doing some more simple examples. 我已经通过做一些更简单的例子验证了mod_rewrite正在工作。

Any help would be appreciated. 任何帮助,将不胜感激。

Try : 试试:

RewriteEngine on

RewriteCond %{THE_REQUEST} /reports/queue\.php\?status=all&frequency=all [NC]
RewriteRule ^ /api/server/server.php?f=ReportQueue&selector=queue [L,QSA,R=302]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM