Multiple RewriteRule's seem to be Conflicting

Discussion in 'Apache' started by ncovill, Feb 7, 2010.

  1. #1
    Hey all,
    For some reason a few of my RewriteRule's seem to be conflicting with one another.
    I have several rules, but these are the conflicting ones:

    Code:
    
    RewriteRule ^([a-zA-Z0-9_-]+)/page=([0-9_-]*)$ /pages.php?cat_id=$1&currentpage=$2 [L]
    RewriteRule ^([a-zA-Z0-9_-]+)$ /pages.php?cat_id=$1 [L]
    
    Code (markup):
    The rule above works fine (i can go to /category fine, it goes to the proper page and everything).

    But once I add in:
    Code:
    
    RewriteRule ^([a-zA-Z0-9_-]+)$ /index.php?order=$1 [L]
    RewriteRule ^([a-zA-Z0-9_-]+)/page=([0-9_-]+)$ /index.php?order=$1&currentpage=$2 [L]
    
    Code (markup):
    The first part stops working (the pages.php rule), but these new rules work fine (the ?order= rules)...
    The ?order= rules are above the pages.php rule in my .htaccess file, but when I put the order rule below the pages.php rule, then the categories rule works fine, while the order rule no longer does... so confused :/

    As always, any kind of help is appreciated!
     
    ncovill, Feb 7, 2010 IP
  2. hostechsupport

    hostechsupport Well-Known Member

    Messages:
    413
    Likes Received:
    23
    Best Answers:
    7
    Trophy Points:
    138
    #2
    Hello,

    Do you have cPanel installed on your server so that you can redirect option to put redirection rules.
     
    hostechsupport, Feb 7, 2010 IP
  3. ncovill

    ncovill Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    This is actually on my test XAMPP server right now. But I do not think I have that option on my hosts control panel :(
     
    ncovill, Feb 7, 2010 IP