.htaccess URL rewriting challenge

前端 未结 2 1684
别跟我提以往
别跟我提以往 2021-01-18 01:32

I\'m having trouble with some URL rewriting.

All of the stuff below works fine, but I need to add a rule which removes querystrings from URLS.

site.c

2条回答
  •  庸人自扰
    2021-01-18 02:13

    I'm a little late for an answer, but since i was searching for a similar behaviour, i thought i should share it: you can also add a flag to a rewrite rule to remove the query string; the flag is [QSD], and it helps avoiding workarounds like the ? at the end ;-)

    Here you can find more about this flag. I feel like pointing out that "This flag is available in [Apache] version 2.4.0 and later"

提交回复
热议问题