0
I have the following rule that was created by another programmer and that is running in some processes:
RewriteRule ^chk-error/(.*) chk_err.php?error=$1 [L]
She recovers everything that comes after chk-error/
and places within error
to be treated within the archive chk_err.php
. Works normally.
But I’ll need to use the same page chk_err.php
and the URL that will access this path will come with a question mark. So:
https://www.example.com/chk-error/?errcat=5&errcd=514&id=12&in=gt5
I would like to adapt so that she can recover everything that comes after the interrogation "?". Without breaking the previous process.
What would the new Rewriterule with the "?" being optional?
In short I wanted to rewrite the Rewriterule that is working to recover that URL:
https://www.example.com/chk-error/errcat=5&errcd=514&id=12&in=gt5
In order to recover this other URL pattern:
https://www.example.com/chk-error/?errcat=5&errcd=514&id=12&in=gt5
Note that the difference between them is only the question mark "?" after chk-error/
.
I don’t understand the question.
$_GET
does not answer?– Caio Felipe Pereira
Hi Felipe I improved the question. When I use GET the variable error comes empty. What it seems that the regex is not picking up everything after
chk-error/?
. But if I remove the interrogation everything works.– zwitterion