URL rewrite using .htaccess
I need a URL like
mydomain.com/myname/?action=post&data=10
Here in a single PHP page (user.php
), I need all myname
, post
开发者_如何转开发and 10
as GET method variables. How can I get it using .htaccess
?
you can add the following to .htaccess
RewriteEngine On
RewriteBase /myname/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L]
精彩评论