I want a nice looking url that can change https://www.url.com/profile.php/?lang=en&user=1#userinfo into https://url.com/profile/en/1#userinfo. And the lang variable is on every page.
I tried to get my extension away and it works
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/$ $1.php
RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)$ /$1/ [R=301,L]
But now i need the get variables, i have looked around but nothing works.