Page 1 of 1

yet another mod_rewrite question

Posted: Sat Feb 10, 2007 2:46 pm
by tecktalkcm0391
.htaccess file has this:

Code: Select all

RewriteEngine on 

RewriteRule ^img([A-Za-z0-9]+).image/$ img.php?pictureid=$1 [NC]

RewriteRule ^([A-Za-z]+)\-([0-9]{1,5})/$ /items.php?cat=$1&id=$2 [NC]
First one works fine, second doesn't work at all. I want it do to this: when user goes to site.com/AB-12345 it shows /items.php?cat=AB&id=12345.

Any ideas why its not working? :(

Posted: Sat Feb 10, 2007 3:02 pm
by feyd
leading slash?

Posted: Sat Feb 10, 2007 10:40 pm
by tecktalkcm0391
Thanks, that worked, but how do I make it so that it doesn't foward from /AB-12345 to items.php?cat=AB&id=12345 and only shows the page.

EDIT: Nevermind got it working. Thanks feyd!
But is there a way to make the AB capitizled if its entered as lowercase?

Posted: Sun Feb 11, 2007 8:30 am
by feyd