开发者

How do I use mod_rewrite to provide RESTful URLs, hiding my script name?

I'm new to using mod_rewrite. Could some one tell me h开发者_开发问答ow to change this url

http://example.com/blog/index.html?page=1

to

http://example.com/blog/page/1

Thanks a bunch!

Kohei


RewriteEngine  on
RewriteBase   /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.html?page=$1 [L,QSA]

try the above lines in your .htaccess

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜