$10 to whoever can answer this mod_rewrite question

Discussion in 'Apache' started by kenbrower, Nov 16, 2008.

  1. #1
    Like most miva owners, I have a module which rewrites the categories for seo purposes, and modifies the htaccess :

    RewriteEngine On
    RewriteCond %{REQUEST_URI} !-s
    RewriteRule ^page/(.*) /Merchant2/merchant.mvc?page=$1

    But because of miva not allowing a subcategory to belong to 2 different categories, I have some duplicate categories which I'd like to have one redirect to the other.

    I tried : redirect 301 /page/C/CTGY/ES_ES http://www.condomman.com/page/C/CTGY/Durex-Extra-Sensitive

    and also : RewriteRule ^page/C/CTGY/ES_ES(.*)$ http://www.condomman.com/page/C/CTGY/Durex-Extra-Sensitive
    /$1 [R=301,L]

    but neither worked because it interfered with the code already in place.

    Any suggestions? I just need to 301 redirect a few categories to their duplicate counterparts, but the preceding code keeps interfering with it.
     
    kenbrower, Nov 16, 2008 IP
  2. kappaknight

    kappaknight Peon

    Messages:
    160
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try putting the exception rules before the general rules.
     
    kappaknight, Nov 18, 2008 IP
  3. kenbrower

    kenbrower Well-Known Member

    Messages:
    574
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    120
    #3
    I tried that, doesn't seem to work .. could you show me what you mean? The specific code?
     
    kenbrower, Nov 20, 2008 IP