mod_rewrite help

Discussion in 'Apache' started by leony, Jun 5, 2008.

  1. #1
    Hello,

    I've got help with the regular expressions in this forum but now I've hit a new problem.

    Normally my dynamic links are:

    product.php?parent_id=gadgets&product_id=10

    For this particular link my mod rewrite is:

    product/gadgets/10/sony-playstation-3

    And related rewrite rule:
    
    
    RewriteEngine On
    RewriteRule ^product/(.[^/]+)/([0-9]+)/(.+)$ product.php?parent_id=$1&product_id=$2
    
    Code (markup):
    But when I click on the link, I get error (page not found).

    What might be the problem?

    Thanks
     
    leony, Jun 5, 2008 IP
  2. leony

    leony Peon

    Messages:
    55
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    By the way,

    I have been playing with the simple rules as:

    
    RewriteEngine on
    RewriteRule ^phones /phones.php 
    
    Code (markup):
    For mydomain.com/phones

    However I get Error 500. When it is

    
    RewriteEngine on
    RewriteRule ^mobiles /phones.php 
    
    Code (markup):
    There is no problem.
     
    leony, Jun 6, 2008 IP