开发者

.htaccess redirect URL to sub-part of URL

开发者 https://www.devze.com 2023-03-27 21:33 出处:网络
I would like to redirect URLs (100\'s of them) of a site based on a pattern match. So for example if the requested url is

I would like to redirect URLs (100's of them) of a site based on a pattern match.

So for example if the requested url is

http://www.example.com/showcase/properties/boston/page/1

I would like to redirect it to

http://www.example.com/showcase/properties/boston
开发者_如何学运维

i.e. remove the /page/1 from the actual url.

I am newbie with all .htaccess concept. So if I have missed any information to add please let me know. Also I would appreciate if somebody can point me to a nice tutorial/book for .htaccess learning.

Thanks very much in advance.

P.S. - The site is built using PHP language.


RewriteRule (.*)/page/(\d+)  $1

I don't know any tutorial about .htaccess! I have apache manual on my PC and I use it!

0

精彩评论

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