Posts marked with ".htaccess" in tags

Password Protect folder in AppFog

You won’t know the location of the .htpasswd file in AppFog. Hence you won’t be able to password protect folders in the normal way. To password protect folders in AppFog you should use a different way. You should add the following location of .htpasswd instead of the full location. If the full location is : /home/simsu/projects/TestPalace/Blog/Password_Protect/.htpasswd The Location of .htpasswd in .htaccess deployed in AppFog should be : ../app/Blog/Password_Protect/.htpasswd If the file is on the root directory, then the location would be : .... [READ MORE]

Password protect folder using HTACCESS

HTACCESS is able to protect folders with passwords. To password protect folders you should mention the location of .htpasswd – a file that contains the username and password to unlock the folder. First of all create a .htaccess file if doesn’t exists and create a .htpasswd file. Now Add username and password to the .htpasswd file which you can get from this simple tool. Add the following text in .htaccess : AuthName "This folder requires a login"... [READ MORE]

Prevent Directory Listing using HTACCESS

If you don’t want your site users to see your directory listing, you can do a simple trick in .htaccess file. Here is a screenshot of a directory listing on Apache Server : Now, to disable directory listing of all types of files, type in the following code in .htaccess : IndexIgnore * This will change the directory listing to this : The empty directory listing looks ugly. To make it beautiful, you can add an index page for all directory listings without adding each index files on each directory.... [READ MORE]

Hide File Extensions In Browsers Using .htaccess

Many of us programmers want to hide the file extension of server files such as .php, .jsp, .py etc…. You can easily hide these extensions with the help of a .htaccess file. This feature is only available to Apache servers. Create a file named .htaccess if your root directory of site doesn’t have one. Add these lines to the .htaccess file : <span style="background-color: white; font-family: inherit;"><span class="kw1" style="border: 0px; color: #2060a0; line-height: 18.... [READ MORE]



Mastodon  Twitter

GitHub GitLab


Demos  Lab


This blog was once on WordPress. Now a static site. See source code on