开发者

numeric RewriteRule with .htaccess

开发者 https://www.devze.com 2022-12-20 00:36 出处:网络
I would like to send URL req开发者_运维问答uests to a PHP script which will handle the 301. The URI\'s I want to capture are dates, like 26-11-2010, without the dashes:

I would like to send URL req开发者_运维问答uests to a PHP script which will handle the 301. The URI's I want to capture are dates, like 26-11-2010, without the dashes:

www.mysite.com/261110/ (6 digits)

What is the RewriteRule for this? my script is

www.mysite.com/redirect.php?data=261110


RewriteRule ^([0-9]{6})/$ /redirect.php?data=$1 [L]

will match any string of 6 digits (whether they are dates or not)

0

精彩评论

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

关注公众号