Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!
Moderator: General Moderators
-
tecktalkcm0391
- DevNet Resident
- Posts: 1030
- Joined: Fri May 26, 2006 9:25 am
- Location: Florida
Post
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?

-
feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Post
by feyd »
leading slash?
-
tecktalkcm0391
- DevNet Resident
- Posts: 1030
- Joined: Fri May 26, 2006 9:25 am
- Location: Florida
Post
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?
-
feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Post
by feyd »