Subfolders using htaccess
I want to have use something like this:
http://localhost/test/dummy
instead of this:
http://localhost/test/profile.php?id=dummy
I know that it can be done with URL Rewrite in .htaccess, but I don't know how exactly it works, so I can't make it work!
Can I anyone please help开发者_运维百科 me??
in your .htaccess file:
RewriteEngine on RewriteBase /test RewriteCond %{REQUEST_FILENAME} ! -f RewriteCond %{REQUEST_FILENAME} ! -d RewriteRule (.*) profile.php?id=$1
also read this: http://httpd.apache.org/docs/current/rewrite/rewrite_guide.html
精彩评论