views:

55

answers:

1

Hi, in my .htaccess file i do have these lines:

Options +FollowSymLinks 
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule
^([a-zA-Z0-9_-]+)/([0-9])/([a-zA-Z0-9_-]+)\.(html)$ /first_gate/index.php?show=true&_=$1&__=$2 [QSA]

So calling:

http://www.domain.com/a-b-c-d/123/an-thing-here.html

in the background it's intended to be:

http://www.domain.com/first_gate/index.php?show=true&cat=a-b-c-d&sub_cat=123

The (an-thing-here) part wouldn't be used for retreiving data but just to improve SEO.

I got: 404 Not found.

Any help would be soooo much appreciated. Thank you,

+1  A: 

Your second pattern group is only matching a single digit, try this instead:

Options +FollowSymLinks 
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule
^([a-zA-Z0-9_-]+)/([0-9]+)/([a-zA-Z0-9_-]+)\.(html)$ /first_gate/index.php?show=true&_=$1&__=$2 [QSA]

I just added a + after the pattern [0-9].

Cryo
Waw!It's clear that i'm new on this!Works fine, thank you so much,
Mbarry