开发者

Url rewrite one step further

开发者 https://www.devze.com 2023-03-02 19:20 出处:网络
I am using this rule now and it is applied to my members... RewriteRule ^member/([0-9]+)/([^.]+).html$ member.php?id=$1&name=$2

I am using this rule now and it is applied to my members...

RewriteRule ^member/([0-9]+)/([^.]+).html$ member.php?id=$1&name=$2

And开发者_JAVA百科 it is looking like this:

http://www.mysite.com/member/1/Foo_Smith.html

I want to take this further and deeper into the site like this:

http://www.mysite.com/member/1/Foo_Smith/Gallery.html http://www.mysite.com/member/1/Foo_Smith/Gallery/viewPhoto/nice_picture_i_took.hmtl

Pages in my root is galleri.php and viewPhoto.php

Any ideas if this is possible and any examples on how to achive this?

Best regards, Joakim


RewriteRule ^member/([0-9]+)/([^./]+)\.html$ member.php?id=$1&name=$2
RewriteRule ^member/([0-9]+)/([^/]+)/Gallery\.html$ gallery.php?id=$1&name=$2
RewriteRule ^member/([0-9]+)/([^/]+)/Gallery/viewPhoto/([^/]+)\.html viewPhoto.php?id=$1&name=$2&photo=$3

I haven't tested it, but I think it should work.

0

精彩评论

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