开发者

How to beautify the URL?

I am sick of this kind of URL:

 www.domain.com/something/?id=person&photos=photoID&variable1=others&...

I am using apache, learning to write .htaccess now. Can anyone show me the basic code for this one?

Ugly:

 www.domain.com/something/?id=person&photos=photoID

Goal:

 www.domain.开发者_如何学运维com/something/person/photoID


RewriteEngine on

RewriteRule ^something/(.*)/(.*)$ something/?id=$1&photos=$2 [QSA]


This is an extremely helpful article on Mod_Rewrite

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜