I want rewrite the URL using 开发者_StackOverflowPHP and/or .htaccess for when a user goes to http://mysite.com/profile they are acctually accessing http://mysite.com/index.php?page=profile
I'm a litte confused how to do this. Is this practice a good idea?
If mod rewrite is activated this should work in the .htaccess:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?page=$1
精彩评论