Y
Hacker News
new
|
ask
|
show
|
jobs
by
alcat
4754 days ago
I make it a habit to put all my public files in directory such as www/, where as .git and other non public but site-related files/directories are contained above this.
2 comments
dan15
4754 days ago
IMO this is the correct approach - Exposing every single file in the repository (including files that don't need to be public) sounds terrible.
link
drivebyacct2
4754 days ago
Yes. I mean, even 6 year old PHP articles get this right, don't serve files from the same place your executing code is running from.
public_html has specific connotations for a reason.
link