Hi,
I need some information on where to store db connection details in php on my server. Currently all the files are in the httpdocs folder. Is it safe to have the db conn file in there? I was thinking of putting the files into another directory with a htaccess file that denies from all users except my scripts. However i have tried
[code]
#Deny access for all users (all IPs), except the same domain IP
Order allow,deny
deny from all
allow from xxx.xxx.xxx.xxx
ErrorDocument 403 /403.html
[\code]
and all i get is 403 errors. Is it possible to deny access when the url is directly typed in but still allow my own scripts to get through?
Thanks matt.
I need some information on where to store db connection details in php on my server. Currently all the files are in the httpdocs folder. Is it safe to have the db conn file in there? I was thinking of putting the files into another directory with a htaccess file that denies from all users except my scripts. However i have tried
[code]
#Deny access for all users (all IPs), except the same domain IP
Order allow,deny
deny from all
allow from xxx.xxx.xxx.xxx
ErrorDocument 403 /403.html
[\code]
and all i get is 403 errors. Is it possible to deny access when the url is directly typed in but still allow my own scripts to get through?
Thanks matt.
Comment