0

I'm sure that my .htaccess file is being read by Apache as I tried to write in random stuff in it, eg: "sifnoweijf", and my page could no longer be displayed.

but why the following rewrite doesn't work?

Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{REQUEST_METHOD} ^(CONNECT|OPTIONS) RewriteRule .* - [R=405,L] 
  • Running Apache 2.2.22 on Windows Server 2012
  • .htaccess file in DocumentRoot, eg: "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs"
  • httpd.conf is configured:

    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all

Anyone?

1
  • is mod_rewrite loaded? you can check it with "apache2 -M" command Commented Nov 20, 2013 at 13:08

1 Answer 1

0

Sorry guys, the rewrite is definitely working.

As you guys can see on my rewrite condition, I'm trying to respond to the CONNECT and OPTIONS request method with HTTP respond code 405. But I'm still getting respond code 200.

The culprit is my network's configuration where the hardware load-balancer is responding on behalf of the web server.

So, having the load-balancer configured properly fixed the issue.

Case Solved

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.