Link to home
Start Free TrialLog in
Avatar of DisneySubs
DisneySubs

asked on

need help creating .htaccess file for linux web hosting

I have a web host that allows multiple domains hosted in the same hosting account, the primary site is the root directory and then the cpanel creates subdirectories for my other sites that are then converted to regular domain names.

I would like to create a very basic .htaccess file that will protect every single site in my hosting account from hackers and spambots. I need to be careful though because if I put an .htaccess file in the root directory I could easily shut down every single domain hosted in my account!

Can anyone help me write a very basic .htaccess file for basic protection of all the websites in my hosting account?

Chad
Avatar of Kelly Black
Kelly Black
Flag of United States of America image

I found this guide pretty valuable:

http://www.javascriptkit.com/howto/htaccess.shtml

Can you be more specific about what you wish to accomplish? You said "Hackers and spambots", I think perhaps you might have Apache server configuration confused with the overall configuration of the server computer. Typically in managed hosting, security of the accounts is a liablity of the provider, and ultimately they are responsible for the security of the system as a whole. You can contribute to this.

If you are worried about someone abusing some web feature of one of the sites, a more direct example will help me guide you.

Avatar of DisneySubs
DisneySubs

ASKER

It sounds like your saying, above, that I don't need to worry about that much about security because my web host is in charge of that. Is that right? But there are a few things I can do to fortify my security. For example, I know it's possible to use .htaccess to prevent spambots from crawling my site, at least the one's that are named. Although I don't know the specifics on how to do this. Is there anything that I use .htaccess for to make my site more secure? I have a somewhat controversial site and some people would love to hack me...

Also, it's important to me that my .htaccess file doesn't restrict people from viewing my subdomains.

Thanks!
Chad

ASKER CERTIFIED SOLUTION
Avatar of Kelly Black
Kelly Black
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial