How to enable and disable htaccess files provides a way to make configuration on a per-directory basis. you can create htaccess file when you running a website using CMS tools. All the rules and configurations will be kept in this file and how to find htaccess file because this is a hidden file in the directory. you can easily write htaccess file when you have server access otherwise you can also make changes from Yoast plugins.
Where a file containing one or more configuration directives, is placed in a particular document directory and then it applies to that directory or subdirectories.
How To Enable and Disable htaccess In Apache:
You should use .htaccess file but when you don’t have access to the main server configuration file.
Note: You must have .htaccess file on your server. If you want to control configuration through that files.
So, You can define these codes between the Virtual-host and define the directory paths according to your needs.
Disable .htaccess in Apache
<Directory “/vaw/www”> Allowoverride none </Directory>
Enable .htaccess in Apache
Check Out: Disable HTTP TRACE Or TRACK Request In Httpd
<Directory “/vaw/www/html”> Allowoverride all </Directory>
That’s it. create htaccess file how to find htaccess write htaccess file write rules in htaccess