Rename .htaccess File

  • Avinash
  • 0
  • Jul 18, 2011
  • Web Server

For most of the sites .htaccess file is handling the most of the stuffs, mainly the URL redirections of the site.

So site attacker can guess that you may have .htaccess file and they may harm your site.

They can access the .htaccess file if you have not protected it using the method described here.

But what if, you can rename the .htaccess file to any other name say htacc.ess , So there can be a rare chances for guessing the name of this file.

Yes you can inform server to read another file as a configuration file. But you need a access to the apache configuration file for this method.

Below is how that works.

While creating a virtual host you just need to give the AccessFileName directives.

You need to place below code while creating a virtualhost.

// So now htacc.ess will be served as .htaccess file AccessFileName htacc.ess
// So now htacc.ess will be served as .htaccess file
AccessFileName htacc.ess

Note: You require access to your httpd.conf file for this setting.

Related Posts

Written by Avinash

Avinash Zala is leading various projects which deals with the various technology involved with the web. A combination of perfect technical and management skills. Avinash would like to chat with you and convert your imagination into the working system. You can get in touch with him on Facebook and Twitter.

View all posts by: