regex - Why is this .htaccess always 404 redirecting? -


rewriteengine on   rewriterule ^(.*)/products/(bikes|antiques)/?([^/]*)?/?$ $1/index.php?page_id=15&category_id=$2&subcategory_id=$3 

i'm trying rewrite

http://website.com/products/bikes/bike1

to

http://website.com/index.php?page_id=15&category_id=bikes&subcategory_id=bike1

you need remove leading slash regex pattern:

rewriterule ^products/(bikes|antiques)/?([^/]*)?/?$ /index.php?page_id=15&category_id=$2&subcategory_id=$3 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -