Apache - hide wwwroot from viewing

Newbie Spellweaver
Joined
Apr 20, 2006
Messages
65
Reaction score
0
Apache - hide wwwroot

Hi , i want to ask , how can i hide WWWROOT from viewing via browsers ? because i can see every file when i put '/' at the end of my web site.I think a hacker can easily sneak into my server , so i need some help to prevent it.
Also , where can i find a guide to avoid MYSQL injection ? (or can you give me some tips?)

thankS
 
.htaccess
Code:
# Prevent viewing of htaccess
<Files ~ "^\.ht">
order allow,deny
deny from all
satisfy all
</Files>

# Disable directory listing from this point
Options -Indexes

# Omit all files from the directory listing
IndexIgnore *

Save the file as .htaccess and put it in your wwwroot folder. Create a blank index.html, put it inside wwwroot folder too.
 
Wow , that was easy , thanks hacker_kts !

I still need some tips to prevent sql injection......
 
Josh said:
mysql injection... make sure you have passwords.
I want to prevent database hacking , thats why im asking some tips to prevent sql injection via php account registration..
 
WOW this is very good the bear i can't belive that!!!!OK i will do that my friend for little Bunny.
I will help and it will vert happy!!!

Don't worry i will help this little Bunny.It will again very happy my friend!!!I will do this for the bear.Ok now i will go to do this and in my opinion is the best thing at all these i have listening.And well done my friend for this think.You hopr on me!!
 
Last edited:
hacker_kts said:
No problem, hope that will solve your problem. ;)

I had some errors(:crash: ), but finally i made it to work :wiggle:
 
Back