• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Image path??

D

darrensw@

Guest
When I use site preview to check my site I am running into problems with image paths...

On all my pages I use a header and footer which are PHP includes.

My images are stored in /var/www/vhosts/mydomain.com./httpdocs/auk/images/

So, index.html pulls in an include which has an <IMG SRC> to my logo:

<IMG SRC="auk/images/misc/headershop_01.gif">

Now, as i move around the site this becomes a wrong SRC because if i go into say /auk/static/members.html, the tag will look for the /auk/images/ directory within /auk/static/ - and it's of course not there - see below:

What i normally do when i create any <IMG SRC> is use:

<IMG SRC="/auk/images/misc/headershop_01.gif">

Note forward slash before auk/images/ - this tells the page that /auk/images/ is as far back as you go in httpdocs, which it is.

So, how can I test all my links and images etc when i can only see my site by using the site preview in Plesk? It's usual for a server to be able to show a site while it's being created at it's ip address, e.g. http://212.241.222.8/ - but Plesk does not or is there a way to configure it to allow this?

Thanks

Darren
 
Back
Top