开发者

Regex question for htaccess redirect

开发者 https://www.devze.com 2023-04-05 16:43 出处:网络
I need to redirect http://mydomain.com/2011/09/anything (where 2011 is any year, and 09 is any month, and anything is anything!)

I need to redirect

http://mydomain.com/2011/09/anything

(where 2011 is any year, and 09 is any month, and anything is anything!)

over to:

http://mydomain.com/special-folder/any开发者_C百科thing

Could someone help me out with the regex for this?

Thanks in advance.


\/[0-9]{4}\/[0-9]{1,2}\/(.*)$    http://mydomain.com/special-folder/$1
0

精彩评论

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