1. Home
  2. Knowledge Base
  3. Applications
  4. Joomla
  5. How do I block direct web access to important Joomla files using .htaccess file

How do I block direct web access to important Joomla files using .htaccess file

Protecting the critical Joomla files from being accessed directly over the web is an essential aspect of your website’s security.

Add this code to your .htaccess file in order to protect your Joomla’s configuration.php file and your .htaccess file from direct access via web

+++++
<FilesMatch “configuration.php”>
Order allow,deny
Deny from all
</FilesMatch>
<Files .htaccess>
order allow,deny
deny from all
</Files>
++++

This will restrict the access to configuration.php and .htaccess files.

Related Articles

Need Support?
Can't find the answer you're looking for?
Contact Support