Dynamic .htaccess

Discussion in 'Apache' started by puffyz, Feb 10, 2008.

  1. #1
    I am trying to make the site dynamic based on two parameters:

    RewriteRule ^(.*)/(.*)$ /category.php?type=$1&query=$2 [L]


    www.url.com/producer/him

    but when I put that in,

    none of my dir work, such as
    /images


    so how can I get around this without putting a word indicator in url or typing out every option in htaccess?

    Thanks.
     
    puffyz, Feb 10, 2008 IP
  2. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #2
    When you say no typing out every option, you mean you don't want somthing like this, which works ?
    RewriteRule ^(images|any-other-dirs|folder) $1 [L]
    RewriteRule ^(.*)/(.*)$ /category.php?type=$1&query=$2 [L]
    Code (markup):
     
    joebert, Feb 11, 2008 IP
  3. puffyz

    puffyz Guest

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    ya that still 404's my images/ dir

    using

    RewriteRule ^(images|any-other-dirs|folder) $1 [L](I want to exclude these from being rewritten)


    RewriteRule ^([^/]+)/([^/]+)$ /category.php?type=$1&query=$2 [L]


    thanks in advance
     
    puffyz, Feb 11, 2008 IP
  4. puffyz

    puffyz Guest

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    thanks just fyi

    RewriteRule ^(images) - [L]

    worked..
     
    puffyz, Feb 11, 2008 IP
  5. giannhs_29

    giannhs_29 Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    i dont understand:S
     
    giannhs_29, Feb 11, 2008 IP
  6. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #6
    I'd be interested to see what Apache placed in the error/access logs for the request that 404'd.
     
    joebert, Feb 11, 2008 IP