开发者

help with rewriterules

I need help rewriting

online.php to -> /users/online

and

profile.php开发者_如何学编程?id=3426 to -> /users/3426

and

users.php to -> /users

Would this be possible?

And is there any good mod_rewrite cheat sheets out there?


Here are the rules to get you started, I've assumed you want the visitor to see "users/online/" but actually deliver the content from online.php.

Because you are using the "users/" pseudo address for each of these, it is reasonably important what order you place the rules in.

RewriteEngine on
RewriteRule ^users/ users.php [L,NC,QSA]
RewriteRule ^users/online/ online.php [L,NC,QSA]
RewriteRule ^users/([^/\.]+)/?$ profile.php?Page=$1 [L,NC,QSA]
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜