开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜