U
U
uranus2352014-09-10 16:45:18
PHP
uranus235, 2014-09-10 16:45:18

How to properly configure GET requests in htaccess?

I set up htaccess on the site so that profile.php?user=$login is available at site/user/$login
like this:

RewriteRule ^user/([a-zA-Z0-9_\-]+)(/?)$ profile.php?user=$1 [L]

I am not strong in htaccess, tell me how to set up the rule at the top so that profile.php?user=$login&foo=bar is available at site/user/$login?foo=bar

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Burov, 2014-09-10
@uranus235

RewriteRule ^user/([a-zA-Z0-9_\-]+)(/?)$ profile.php?user=$1 [L,QSA]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question