regex - Obtain url get variables when htaccess is already creating a query string -
i have rule in .htaccess
generates query string according url syntax:
rewriteengine on rewriterule a_([0-9]+)_(.*).html$ article.php?id=$1 [l]
so url this:
a_52_how-to-use-htaccess.html
generates: article.php?id=52
my question how allow htaccess add query string other variables sent on url:
a_52_how-to-use-htaccess.html?debug=true
in order have:
article.php?id=52&debug=true
any ideas? thanks.
use qsa
flag:
rewriteengine on rewriterule a_([0-9]+)_(.*)\.html$ article.php?id=$1 [l,qsa]
qsa
(query string append) flag preserves existing query parameters while adding new one.
Comments
Post a Comment