开发者

numeric RewriteRule with .htaccess

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜