htaccess quandry

Discussion in 'Programming' started by Nigel Lew, Oct 7, 2009.

  1. #1
    Hi folks. I am working with a tiny little app that essentially parses a shareasale feed.

    It is under dev here http://www.sportsfanshopping.com/index.php

    So, I am wondering if I can clean up the urls a bit more. For example
    http://www.sportsfanshopping.com/products_60_1.html Can I actually call the category into the url which is this case is boxing?

    I would also like to pull product_ out of the url and products_ actually a level back like the first link.

    I am exactly sure if this is even possible but I figured I would give it a whirl.

    htacess looks like this
    RewriteBase /
    
    RewriteRule ^news_(.*)_(.*).html$ news.php?id=$1 [L]
    RewriteRule ^product_(.*).html$ product.php?id=$1 [L]
    RewriteRule ^products_(.*)_(.*).html$ product_list.php?category=$1&page=$2 [L]
    Code (markup):
     
    Nigel Lew, Oct 7, 2009 IP