1

I have a domain where the urls can be like

www.mydomain.com/home.php?q=abc

Is it possible to Let users enter url as www.mydomain.com/abc, and I somehow get the "abc" part, do all database queries, and show the contents of home.php?q=abc, but keep the url as www.mydomain.com/abc

I do know how to get /home.php?q=abc to show as /home?q=abc using htaccess.

aVC
  • 2,254
  • 2
  • 24
  • 46

1 Answers1

0

PLease try this

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l


RewriteRule ^(.+)$ home.php?q=$1 [QSA,L]