2

I'm building a Drupal CMS website on IIS 6 and using ISAPI Rewrite 3 to make the url's more readable. My problem is that I have a virtual directory located within the Drupal site but which points to a local directory outside of the Drupal website folder. I do not want ISAPI Rewrite to rewrite urls pertaining to this virtual folder. For example:

www.domain.com - rewrite everything

www.domain.com/pdf/ - exclude from url rewrites

Is this possible?

Other info: Drupal version 6.19 -- ISAPI Rewrite 3 -- IIS 6 -- Windows Server 2003 R2

Edit #1: the folder to be excluded contains pdf documents. Currently when I try to open a pdf via url (e.g. www.domain.com/pdf/thisdocument.pdf) it gives me a 404 page not found error - handled by ISAPI Rewrite.

JohnyD
  • 83
  • 1
  • 10

1 Answers1

0

I'm pretty sure you can use RewriteCond for this (http://www.helicontech.com/isapi_rewrite/doc/RewriteCond.htm):

RewriteCond %{REQUEST_FILENAME} !(^/pdf/)
RewriteRule (Your rule here)

You can also use

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (Your rule here)

To exclude any existing files or directories from your RewriteRule.

Spiny Norman
  • 8,277
  • 1
  • 30
  • 55