[thelist] rewrite rule
Dan McCullough
dan.mccullough at gmail.com
Fri Apr 15 08:32:14 CDT 2005
I have some rewrite rules that work pretty well. However in case
someone inadvertanly drops the last slash I need to have a rule to add
the slash to the end of its missing.
current:
RewriteRule ^/category/([0-9]+)/([0-9]+)/$ /category.jsp?catid=$1&type=$2 [L,PT]
RewriteRule ^/subcategory/([0-9]+)/([0-9]+)/([0-9]+)/$
/subcategory.jsp?catid=$1&type=$2&style=$3 [L,PT]
RewriteRule ^/product/([0-9]+)/([0-9]+)/([0-9]+)/([0-9]+)/$
/product.jsp?catid=$1&type=$2&style=$3&prodid=$4 [L,PT]
adding:
RewriteRule ^/category/([0-9]+)/([0-9]+)$ /category/$1/$2/ [R]
RewriteRule ^/subcategory/([0-9]+)/([0-9]+)/([0-9]+)$ /subcategory/$1/$2/$3/ [R]
RewriteRule ^/product/([0-9]+)/([0-9]+)/([0-9]+)/([0-9]+)$
/product/$1/$2/$3/$4/ [R]
there seems to be a problem with the new rules. any thoughts?
More information about the thelist
mailing list