Excluding a directory for Mod Rewrite?

Discussion in 'Apache' started by mizt, Jun 12, 2005.

  1. #1
    I have a slight situtation at hand. My new htaccess is interferring with one in another directory.

    Root htaccess
    Options +FollowSymlinks
    
    RewriteEngine On
    #this may cause isues with subdirs and so I have not enabled it.
    #RewriteBase /
    RewriteRule [.]*-vf([0-9]*) viewforum.php?%{QUERY_STRING}&f=$1
    RewriteRule [.]*-vp([0-9]*) viewtopic.php?%{QUERY_STRING}&p=$1
    RewriteRule [.]*-vt([0-9]*) viewtopic.php?%{QUERY_STRING}&t=$1 
    PHP:
    Root/Archive/ htaccess
    RewriteEngine On
    RewriteRule ^.+\.html$ index.php [L]
    RewriteRule ^.+\.htm*$ index.php [L]
    RewriteRule ^member-.+\.html*$ index.php [L]
    RewriteRule ^members.+$ index.php [L]
    RewriteRule ^(.+)/$ index.php [L]
    
    PHP:
    How can I disable the main htaccess in the root directory not to invole itself with the archive directory. :eek: TIA
     
    mizt, Jun 12, 2005 IP
  2. ro_core

    ro_core Peon

    Messages:
    6
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Prefix each rule with:
    RewriteCond %{REQUEST_URI} !/archive

    Finally giving you:

    RewriteCond %{REQUEST_URI} !/archive
    RewriteRule [.]*-vf([0-9]*) viewforum.php?%{QUERY_STRING}&f=$1

    RewriteCond %{REQUEST_URI} !/archive
    RewriteRule [.]*-vp([0-9]*) viewtopic.php?%{QUERY_STRING}&p=$1

    RewriteCond %{REQUEST_URI} !/archive
    RewriteRule [.]*-vt([0-9]*) viewtopic.php?%{QUERY_STRING}&t=$1
     
    ro_core, Jun 13, 2005 IP