Using .htaccess file you can easily change the default error pages that are being served by your web server. To use .htaccess to modify your web site error pages your server needs to be configured with AllowOverride FileInfo. Most web hosting servers are configured in such a way so having a custom error page instead
Continuar leyendo...
Having a listable directories on your site sometimes is useful. However, some times it can be considered a security issue. No, matter which option you prefer you can control this behavior of your site using 1 simple line: Options +Indexes The above line enables Directory listing. Options –Indexes The above disables directory listing for your
Continuar leyendo...
What is .htaccess The .htaccess file is a simple text file (in ASCII format). In general you can use, .htaccess files to change some configuration directives of the apache web server. However, .htaccess files can do lot more than simply change some settings of your web server as you will find from the topics listed
Continuar leyendo...
A user emailed me and asked how to create a password for a .htpasswd file using PHP. It is actually very simple. Below is a PHP script that generates a password for .htpasswd from the clear text password stored in $clearTextPassword. Please note: For Apache servers running on Windows you have to use the htpasswd
Continuar leyendo...