开发者

Simple question about htaccess rewrite

I don't know much about rewrite, I would like to do the following thing...

I have http://www.website.com/web.php?id=3

But I would like http://www.website.com/web/title/3

is this possible? (title is the url web title开发者_开发问答 tag)

Thanks.


yes it is possible. you can add following in .htaccess file

RewriteEngine on
RewriteRule ^web/([a-zA-Z0-9_-]+)/([0-9]+)\$ web.php?id=$2

more tips: http://roshanbh.com.np/2008/03/url-rewriting-examples-htaccess.html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜