Home htaccess remove get variable to make better url
Reply: 0

htaccess remove get variable to make better url

user648
1#
user648 Published in April 20, 2018, 6:06 pm

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.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.307938 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO