A
A
Alexey2018-12-07 12:21:09
htaccess
Alexey, 2018-12-07 12:21:09

Does a question mark not followed by get parameters count as a query string??

Trying to redirect example.com/categories? at example.com/categories.
RewriteCond %{QUERY_STRING} ^\?$
RewriteRule (.*) %{REQUEST_URI}? [R=301,L]
This rule only works if the first question mark is followed by another one.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question