Apache重写URL-修复附加字符串URL

发布于 2025-01-19 11:24:34 字数 802 浏览 0 评论 0原文

我在apache中有以下规则。

RewriteRule ^employees$ /all.php?fitler=employees  [L,QSA]

此页面有分页。

因此,第一页要正确,但是当我点击第2页(在分页按钮中)时,它将& p = 2添加到URL中,然后对于3rd Page im for of tot of tot &p=2&p=3

enter image description here

Then the 4th page is &p=2&p=4

Not sure how do I fix this 。

Update1:

Requested URL

https://example.com/empolyee

To be redirected

https://example.com/all/php?filter=employee

with pagination(let's say when I check page 3)

https://example.com/all/php?filter=employee&p=3

I have the following rule in my apache.

RewriteRule ^employees$ /all.php?fitler=employees  [L,QSA]

This page has pagination.

So the first page is coming properly, But when I hit page 2(in the pagination button), its adding &p=2 to the url, then for the 3rd-page im getting both &p=2&p=3

enter image description here

Then the 4th page is &p=2&p=4

Not sure how do I fix this.

Update1:

Requested URL

https://example.com/empolyee

To be redirected

https://example.com/all/php?filter=employee

with pagination(let's say when I check page 3)

https://example.com/all/php?filter=employee&p=3

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文