I have setup my own simple framework with a file structure like this:
root
libs
public_html
product-images
image1.jpg
image2.jpg
etc...
controllers
models
views
scripts
The problem is, is that my image src for a product has to start with one or two ../’s depending on which page you’re on. In some cases I have to declare the full path to the image which looks like:
http://www.mysite.com/public_html/product-images/image1.jpg
Obviously this isn’t very good for SEO.
My question is how can I remove the public_html bit but keep all the images working, without altering the file structure of my site?
Your web server document root should be public_html, not root.