Re: Removing single question mark?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Thu, Jun 20, 2024 at 7:08 PM Dave Wreski <dwreski@xxxxxxxxxxxxxxxxxxx.invalid> wrote:

Hi, I should add that I wrote the following to remove an errant question mark from the end of another URL, but it doesn't appear to work for the homepage.

RewriteCond %{THE_REQUEST} /features\? [NC] 

RewriteRule ^ %{REQUEST_URI} [L,R=302,NE,QSD]


I think %{THE_REQUEST} is the way to go. But what do you mean about "the homepage" and how does it relate to /features in your regex?
Maybe you want something closer to this for a request with a trailing ? and no actual query:
RewriteCond %{THE_REQUEST} "? HTTP/" [NC]

If it doesn't work, post rewrite:trace8 output.

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux