Why it won't work without the REDIRECT flag?

Discussion in 'Apache' started by GRex, Oct 23, 2006.

  1. #1
    RewriteRule ^tag/?(.*)$ /index.php?tag=$1 [QSA,L,R]

    My rewrite script won't work without the redirect (R) flag. Only when I've put the R flag the page would show the correct data, but the URL is no longer human-friendly.

    This actually has to do with the Wordpress Tag Warrior plugin.

    sub.domain.com/tag/subject should show posts that have the tag "subject". If I remove the R flag above into:

    RewriteRule ^tag/?(.*)$ /index.php?tag=$1 [QSA,L]

    sub.domain.com/tag/subject would give me not result at all (but no http error either).

    What's interesting is without the R flag, the system configuration works for other sites of mine. This site which happens to be a subdomain (as in "sub.domain.com", I dunno if it matters) is not giving me the same result with the similar script.

    What could be wrong here?
     
    GRex, Oct 23, 2006 IP
  2. hgsupb

    hgsupb Peon

    Messages:
    65
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    don't you use RewriteBase?
    there should be "RewriteBase /tag/"
    before your rules.
     
    hgsupb, Oct 25, 2006 IP