php - .htaccess rewrite URL for multiple pages and fetch arguments passed to the URL
Get the solution ↓↓↓Solution:
This should work for you:
RewriteEngine On
RewriteCond %{THE_REQUEST} ^(GET|POST)\ /profile\.php\?username=(.*)\ HTTP
RewriteRule ^ /%2\? [R=302,L]
RewriteRule ^(.*)$ profile.php?username=$1 [L]
Answer
Solution:
http://example.com/profile.php?username=([a-z]*)
then you can redirect to
http://example.com/$1
I'm not sure if it is $1 or \1 but you have to use regular expression
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: mysqli::real_connect(): (hy000/2002): connection refused
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.