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!
KoheiRewriteEngine 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
精彩评论