0% found this document useful (0 votes)
28 views5 pages

How To Disable HTTP Options Methods in Apache

The document provides instructions to disable HTTP OPTIONS methods in Apache by opening the .htaccess file, adding lines to rewrite rules to block OPTIONS, TRACE and TRACK methods, and restarting the Apache web server for changes to take effect.

Uploaded by

Fedingo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views5 pages

How To Disable HTTP Options Methods in Apache

The document provides instructions to disable HTTP OPTIONS methods in Apache by opening the .htaccess file, adding lines to rewrite rules to block OPTIONS, TRACE and TRACK methods, and restarting the Apache web server for changes to take effect.

Uploaded by

Fedingo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

How To Disable HTTP

OPTIONS Methods in
Apache
Open htaccess file

Open .htaccess file, typically located at /var/www/html/.htaccess

$ sudo vi /var/www/html/.htaccess
Disable HTTP OPTIONS methods

Add the following lines to your .htaccess file to disable OPTIONS, TRACE and TRACK methods.

RewriteEngine On

RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS)

RewriteRule .* - [F]

Similarly, you can disable HEAD, PUT, DELETE methods by adding/replacing TRACE|TRACK|OPTIONS
Restart Apache Web Server

Restart Apache web server to apply changes.

$ sudo service apache2 restart


Thank You

Visit for details


https://ubiq.co/tech-blog/how-to-disable-http-options-meth
ods-in-apache/

You might also like