www vs. public folder
Category: General Server Setup
I have been told by someone optimizing our site that our files should be in the www and not the public folder. I didnt know this was possible? He claims it is like having multiple copies of the same page.
It actually doesn't matter what folder you place your files in, because as you might have noticed, they are duplicated into the other folder automatically.
The server isn't actually storing two copies of the same files, instead the <code>www</code> file is simply a <strong>symbolic link</strong> to the main <code>/public_html</code> folder. These can also be called a <strong>symlink</strong>, or a <strong>soft link</strong>.
The <code>www</code> symbolic link could be deleted and the target directory of <code>/public_html</code> would remain unaffected. However if you deleted the <code>/public_html</code> directory, when you went to try to access the <code>www</code> symbolic link, it would cease to function because the target it was linking to no longer existed.
Hope that helps clear things up. Please let us know if you had any further questions at all!
Like this Question? Tweet