views:

111

answers:

1

I would like to send URL requests 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

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

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

andrewmabbott