Best .htaccess Settings?

All about web hosting, reseller hosting, cpanel, optimization, using your hosting plan, etc.

Best .htaccess Settings?

Postby TheJets » Mon Dec 14, 2009 2:34 pm

Just wondering what a general safe .htaccess file should contain. I would like to create 1 .htaccess file and just upload it to all my sites. One of the main things i'm looking for is to prevent people freely browsing certain files/directories.

Can someone help me out?
TheJets
 
Posts: 10
Joined: Sat Dec 12, 2009 5:05 pm

Re: Best .htaccess Settings?

Postby Andrew » Mon Dec 14, 2009 2:38 pm

It really depends what you want to achieve. There is no single .htaccess file that would be suitable for everyone.

A good place to start is searching on Google for tutorials and also here:
http://httpd.apache.org/docs/1.3/howto/htaccess.html
Andrew
 
Posts: 20
Joined: Fri Dec 11, 2009 5:56 am

Re: Best .htaccess Settings?

Postby Jhon Kelly » Fri Dec 18, 2009 11:11 am

ANY system administrator can read ANY document on one of their machines. Encrypting is not a good answer for web access, in fact truly sensitive documents should never be publicly visible to the web. Better is to store sensitive material in a database and use dynamic web page generation to view it. This can be controlled by the inbuilt database security (set your own root password and a password for yourself as an administrator on mysql and even su can't read it).
Jhon Kelly
 
Posts: 101
Joined: Fri Dec 18, 2009 9:32 am

Re: Best .htaccess Settings?

Postby Beaten Rice » Mon Dec 21, 2009 5:32 am

My only experience with editing these files is when my installation of Joomla (a content management system) warned me that my global registers was turned on, which is a security risk. It said to edit the .htaccess file, which I did, but that didn't turn off the warning. So after some research I found that I could upload a php.ini file and here is a template you can use .
Beaten Rice
 
Posts: 51
Joined: Mon Dec 21, 2009 5:15 am


Return to Shared hosting

Who is online

Users browsing this forum: No registered users and 1 guest

cron