Natvigation bar

Tutorials--Deleting problem .htaccess

Introduction

Sometimes we may put a .htaccess on our site to create password-protected directories. However, a problem .htaccess can also cause great inconvenience since you kept getting an 500 error and cannot access that directory. Moreover, .htaccess file is invisible through ftp, thus impossible to delete it through ftp.

Solution

It is impossible to delete .htaccess through ftp. However, we can use our shell access to delete the .htaccess file as it is visible in shell.

How to work it out?

First download putty. You may download it by the link in the change password tutorial or some where else. Then follow the instruction about login in the change password tutorial. You should be logged in before carrying out the follow steps.

After typing your username and password and logged in successfully, your should see the beigetower logo below:

__________________________________________________
_____ _____
\ / \ /
/ /___/\_________/ /____/\_/\_______
___/ __ \ _\ \ __ \ _\ __/_ \ // /_\ __/
\ / /_/ / _/ //_/ / _/ / /_/ / / _/ /
/ \____/__//\__ /__/ /_____/\__/__/ \
\_________/ \/ // /_______________/
\_____/ \_heavy internet industries
--------------------------------------------------
**** YOUR ACTIONS ARE LOGGED AND MONITORED ****
--------------------------------------------------

Next, you can use the command 'cd' to change the directory to the one which contains that .htaccess file. The command should be:

cd public_html/YOUR_WEB_SITE_NAME/html/DIRECTORY_WITH_.htaccess

For example, if the .htaccess is in the directory 'secure' and your website name is 'abc.beigetower.org', the command should be:

cd public_html/abc.beigetower.org/html/secure

Then use the command 'ls' to make sure the .htaccess file is in that directory. Type the command:

ls -a

Make sure you find the .htaccess your want to delete.
Finally, use the command 'rm' to delete the .htaccess file:

rm .htaccess

Don't forget to log out after using your shell!