.htaccess, get parameters together?

92 Views Asked by At

/index.php?user=username TO /username

AND

/index.php?page=settings TO /settings

Please help me, suggest solutions for .htaccess or PHP, would be very grateful!

1

There are 1 best solutions below

0
On BEST ANSWER

change .htaccess code to

RewriteBase /

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /(.*)$ index.php?user=$1
RewriteRule /(.*)$ index.php?page=$1