开发者

Redirecting a dynamic page to a new dynamic page

开发者 https://www.devze.com 2022-12-16 11:28 出处:网络
My site has the following url structure: /shoe/view/3 /shoe/view/5 /shoe/view/86 /shoe/view/124 I want to 301 redirect everything using htaccess to a new structure like so:

My site has the following url structure:

/shoe/view/3
/shoe/view/5
/shoe/view/86
/shoe/view/124

I want to 301 redirect everything using htaccess to a new structure like so:

/开发者_如何学运维item/3
/item/5
/item/86
/item/124


This should do the job:

RedirectMatch 301 \/shoe\/view\/(.*)$ http://www.example.com/item/$1


What about something like this :

RewriteEngine on
RewriteRule ^shoe/view/(.*)$ /item/$1 [R=301]
0

精彩评论

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

关注公众号