...

View Full Version : should the admin directory be inside the public_html with password or outside



o0O0o.o0O0o
05-15-2008, 05:31 AM
hi,

I my website i have placed the admin directory inside the public_html.
You can say almost my every other directory is inside the public_html.

Is that safe or public_html should only contains scripts which the users have access to .

Is there any guide on how should be the directory structure of a website

_Aerospace_Eng_
05-15-2008, 05:35 AM
If you can put the password outside. Ideally you can put the username and password in a database then just check the posted stuff with the database stuff. Be sure to use mysql_real_escape_string on the posted stuff as to prevent mysql injection. Btw how will you get to the admin directory yourself if its outside of the public_html directory?

As to a guide, no there really isn't one but to keep files together its better to create directories for them. For example I have an index page and a directory called inc. In inc I put all of my includes. Then I have a folder called js. I put all my .js files in there. Same goes for CSS. Same goes for images. I have an admin directory that contains only files that would be used by the admin pages. If you are using includes be sure to prevent them from being accessed directly.

o0O0o.o0O0o
05-15-2008, 05:47 AM
Currenly my files in the include folder are listing on the website when i use

...com/include/

How can i prevent it

o0O0o.o0O0o
05-15-2008, 06:09 AM
Found it

put


IndexIgnore * or Options -Indexes
in the .htaccess file in that directory



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum