I have created a database with url slug and it contains urls like mysite.com/blog/content/user1
and blog is folder where file is so I want to change mysite.com/blog/page.php?name=content&user=user1
to mysite.com/blog/content/user1
how can I do that I have tried
RewriteEngine on RewriteRule ^([a-z]+)$ page.php?name=$1&user=$2
but that doesn't works
Try this one
RewriteEngine on
RewriteBase /
RewriteRule ^blog/([^//]+)/([^//]+)$ blog/page.php?name=$1&user=$2 [QSA,L]
Please avoid making the slug record using /
which means the uri segment better to use -
for you slug so if your url is something mysite.com/blog/page.php?name=content&user=user-a
and you want to show like mysite.com/blog/content/user-a
them above rule will also work for that url aso