People, I set up my Joomla site and I see that its htaccess file comes in the form of txt file (htaccess.txt). But at the same time it is written that I should rename it into .htaccess. But my site doesn't work on my local server (my computer) when I do the renaming. I have few questions: why doesn't it comes in the right format originally? And should I rename this file into .htaccess when I upload my site to the server or let it stay the way it is (txt format)? Will it work there then?
It is set to .htaccess for things like the search engine friendliness for example. I tried it too in my own box. It works in Cpanel but I take it you do not have Cpanel. I think with some FTP programs you can change the name, but dont quote me on that one.
When you upload your site, you are merely uploading the MySql database into the PHPMyadmin and the compressed .zip (.rar or whatever you are using ) file of Joomla software. If you have to do a manual install of Joomla... good luck ! You are not going to upload Joomla files I hope.
You need to define a few directives in the file. I think the default txt file has what you need commented out. For example: Order Deny,Allow Deny from all Allow from 100.100.100.100 The allow should be 127.0.0.1 I believe or your local pc ip address. There are other directives for php, SEF, etc. The above will restrict access.
i think...you should rename it to .htaccess when you want to activate rewrite modul (for search engine friendly url). but if you dont need to activate it, let it as the original
How do you plan to get joomla files on your server then ? - On your local server you need to be using an Apache server and have mod_rewite enabled to use the htaccess file. If you use WAMP server you can go to Apache - > Apache modules and click on the rewriite module to enable it, it will have a tick next to it when enabled, and restart the server. Joomla's .htaccess file is disabled by default probably because it can kill/stop some sites if they are not compatible, and also not every one uses an Apache server [although most hosts do]. Once enabled the .htaccess may need still further configuration to make your site work properly on your server. If you enable your .htaccess and then recieve internal server 500 errors then you'll know something needs to be commented out or a setting changed. Htaccess file will not work if you leave it with a .txt extension. Joomla's .htaccess is used for SEF [search engine friendly - human readable ] urls, and providing basic security. Even if you don't plan on using SEF urls I would enable .htaccess just for the small security benefit it provides.
Uploading each single uncompressed file from your computer to your webhosting will take way too long. The htaccess.txt works fine as it is on your webhost account, but you can not use it that way with all the SEO settings in Joomla.
That's exactly what happened. I had to comment out one string and everything started working properly... I also had a headache with my configuration file, but that is another story...