Excluding a directory in .htaccess from domain root

I have a drupal installed in our main domain. http://domain.com

And a WordPress installed in a directory domain.com/directory

Read More

Sometimes when I accessed the wordpress from domain.com/directory it delivers me to domain.com/

Heres a part of .htaccess from the domain root..

 <IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteBase /
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

What should I do to exclude domain.com/directory from domain root in DRupal?
Thanks.

Related posts

Leave a Reply

2 comments

  1. You should just be able to add this line:

    RewriteCond %{REQUEST_URI} !^/directory [NC]
    

    So that it now looks like this:

    <IfModule mod_rewrite.c>
      RewriteEngine on
      RewriteBase /
      RewriteCond %{REQUEST_URI} !^/directory [NC]
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_URI} !=/favicon.ico
      RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
    </IfModule>