| View previous topic :: View next topic |
| Author |
Message |
Mupolan
Joined: 30 May 2006 Posts: 101
|
I don't know if that is a http server or html stuff, but locally, if I have something like <img src=/my_image.png> , that doesn't work. But that works on the server my site is stored on.
Does my apache do not understand absolute path ? |
| |
|
|
|
|
Poolkop
Joined: 01 Jun 2006 Posts: 123
|
| Where should the /file.ext be? in the same directory as html page? |
| |
|
|
Mupolan
Joined: 30 May 2006 Posts: 101
|
No, on the site root
Maybe the use of alias make the absolute path to point to the wrong location ? |
| |
|
|
AmeliaR
Joined: 31 May 2006 Posts: 142
|
| So you have localhost/directory/file.html and the image is in /directory |
| |
|
|
Mupolan
Joined: 30 May 2006 Posts: 101
|
| (my local site is a alias in httpd.conf) |
| |
|
|
Poolkop
Joined: 01 Jun 2006 Posts: 123
|
| Btw. use quotes <img src="/my_image.png"> |
| |
|
|
AmeliaR
Joined: 31 May 2006 Posts: 142
|
| And <img.... /> |
| |
|
|
Mupolan
Joined: 30 May 2006 Posts: 101
| |
Poolkop
Joined: 01 Jun 2006 Posts: 123
|
Don't know what are you trying to say, but /> belongs to xml(so xhtml too). in html the slash should not be there.
*-should +must |
| |
|
|
AmeliaR
Joined: 31 May 2006 Posts: 142
|
| Poolkop: can you browse to localhost/data/site/ |
| |
|
|
Poolkop
Joined: 01 Jun 2006 Posts: 123
|
| Sorry, i don't remember know how to make uri from a server root :/ |
| |
|
|
|
|
Mupolan
Joined: 30 May 2006 Posts: 101
|
| No, I can't |
| |
|
|
Poolkop
Joined: 01 Jun 2006 Posts: 123
|
| Should be the same as you typed it - "/my_image.png" for image lying in server root. |
| |
|
|
Mupolan
Joined: 30 May 2006 Posts: 101
|
Well, it seems it search the image on the server root, like http://localhost
Not on the site root |
| |
|
|
Poolkop
Joined: 01 Jun 2006 Posts: 123
|
| If it's in the same dir as site, then without slash, if it's one (or more) levels higher, use ../ to go one dir up... nothing more could i say, sorry. |
| |
|
|
Mupolan
Joined: 30 May 2006 Posts: 101
|
| Ok. np. thanks anyway |
| |
|
|
|