Saturday, July 30, 2011

Cannot rename htaccess.txt to .htaccess in cPanel File Manager

Just today I was trying to fix the 404 broken link problem with the Joomla installation on my upcoming website, which will contain certain knowledge base about LDAP and directory servers in general, along with discussion forums.
So, they say WARNING! Apache users only! Rename htaccess.txt file to .htaccess before activating.
I opened the File Manager from CPanel, scrolled down to the htaccess.txt file right clicked and renamed it and the File Manager finally said "No! You can't rename, a file already exists." I tried and retried several gimmicks but it didn't work.
Solution: Then I decided to try legacy file explorer, I opened the CPanel Legacy File Manager, located htaccess.txt, clicked it, selected Rename from the menu, typed in .htaccess and it worked well ;)

A Confusion: I got confused and start thinking, shall I rename htaccess.txt to htaccess.htaccess or just remove the .txt from end of file name, and put a dot at the start of file name? Well the answer is yes, I had to take the second option. Therefore, just rename it to .htaccess that means a file with no name but just an extension.
And one more thing, I renamed htaccess.txt to htaccess_.txt and then tried to access my website, even the home page of my Joomla based website didn't show up let alone the broken links which I was trying to fix :p
Therefore, be very careful when you touch these configuration files, they are absolutely sensitive. Some times you catch the bug right after saving that file and refreshing that page but at some other time the setting you've just changed has got a much deeper effect which gets unleashed by some twisted user action sequence, so here's the GOLDEN ADVICE

Back those files up!!!