質問

Here is my current .htaccess file. This file is in my root directory for my site. I want to add a rule that in plain english will do the following.

COMPLETELY SHUT OFF RULES PROCESSING FOR http://www.sc-pa.com/dr405/*.*

RewriteEngine On
RewriteBase /


RewriteCond %{HTTP_HOST} (www.sarasotaproperty.net|www.sc-pa.net|sc-pa.net|sarasotaproperty.net) [nc]
#RewriteRule ^(.*)$ http://www.sc-pa.com/$1 [R=301,NC,QSA]
RewriteRule (.*)/eurl\.axd/[0-9a-f]+ /$1 [L]

RewriteMap  lc int:tolower

RewriteCond %{REQUEST_URI} [A-Z]
RewriteCond %{REQUEST_URI} !.*(js|css|inc|jpg|gif|png)
RewriteRule (.*) ${lc:$1} [R=301]



RewriteCond %{REQUEST_URI} !.*(web_content/pdf/|/dr405/).*
RewriteCond %{SCRIPT_FILENAME} !-d   
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule (?!.*/web_content/pdf/)([^/]*?\.pdf) /web_content/pdf/$1 [R=301]

RewriteRule pasite-(.*\.asp)$  /content/$1 [R=301,QSA]
RewriteRule home\.asp$  / [R=301]

#RewriteRule ^search/tpp/?$ content/search_tangible.asp 
#RewriteRule ^search/?$ content/search_real_property.asp 
#RewriteRule ^downloads/?$ content/downloads.asp
#RewriteRule ^(.*?view)/([^/]*)/([^/]*)(/.+)? /search/parcel_detail.asp?account=0&$2=$3 [NC,LP,QSA,R=301]
役に立ちましたか?

解決 2

Moved the site to IIS7 and used the built in rewrite module.

他のヒント

If you need to completely disable rewriting and .htaccess files for this directory and subdirectories you may use section in the HTTPD.CONF file. Here is an example:

<Directory C:/inetpub/mysite/dr405>
   RewriteEngine off
   AllowOverride None
</Directory>

Please note you need to use fully qualified path, i.e. C:/intepub...

If you simply want to exclude this directory so rules from current .htaccess file will not be applied you may place this rule at the beginning of your site's .htaccess file:

  RewriteBase /


  RewriteRule ^dr405 - [L]

  RewriteCond %{HTTP_HOST} (www.sarasotaproperty.net|www.sc-pa.net|sc-pa.net|sarasotaproperty.net) [nc]
  #RewriteRule ^(.*)$ http://www.sc-pa.com/$1 [R=301,NC,QSA]
  RewriteRule (.*)/eurl\.axd/[0-9a-f]+ /$1 [L]
  # ... etc....
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top