Quick mod_rewrite Question... Limit Numbers
Posted: Wed Jun 25, 2008 6:17 pm
I have this in my .htaccess file, but when you go to /12345/567/12/abc123 it doesn't send at 404, it should only work if it follows: 4numbers/2numbers/2numbers/2numbers/anything but it doesn't for the numbers parts... anyway to make sure its 4 or 2 digits any send 404 if it isn't in the format...
Thanks!
Thanks!
Code: Select all
Options +FollowSymLinks
RewriteEngine on
RewriteRule ([0-9]{4})/([0-9]{2})/([0-9]{2})/([0-9]{2})/([A-z0-9_.]+)$ index.php?year=$1&month=$2&week=$3&random=$4&filename=$5