Hi, I have mistakenly deleted .htaccess file from public_html and now has got just a basic Wordpress redirection in this. Do I need to add there some code if I'm using W3C Total Cache on Shared hosting? The plugin does not show any error message and seems to be working.
Yes W3C Total Cache will have its own set of lines added in htaccess. At first you need to setup the blank .htaccess file and chmod 666 or 777 (not needed if you are with HostGator etc.) and then you need to set permalinks in wordpress which will add to .htaccess. Then go inside Performance/W3TC and there you would be shown links to automatically enable it and it will write the codes in the templates as you have fixed. After everything is complete chmod back .htaccess to a lower value like 644 to be safe.