Page 1 of 1

How to enable absolute path?

PostPosted: 03. March 2006 19:15
by Cyrus
I just installed XAMPP to test my site offline. But, I just noticed that absolute path is not working.

Example : I want to call a spacer.gif from the images folder, so the path would be "/images/spacer.gif" but its not working. However, using relative path "images/spacer.gif" works...

I would like to know is there anyway to enable the absolute path?

PostPosted: 03. March 2006 23:47
by Dave_L
What's the full file system path for spacer.gif, and how exactly are you referencing it in HTML?

PostPosted: 04. March 2006 02:16
by Cyrus
The full system path would be D:\Program Files\xampp\htdocs\images\spacer.gif and I'm referring it using <img src="/images/spacer.gif" />

PostPosted: 04. March 2006 05:57
by tjthedj
it should already be enabled it works fine on my system when i do that.

on my machine that image with /images/spacer.gif
would draw from here
http://localhost/images/spacer.gif

o, i think i know the problem,

r u typing localhost in the browser address bar or are u just opening the page by doouble clicking the page in the htdocs folder?

PostPosted: 05. March 2006 14:08
by Cyrus
Problem solved...

It seems that I forgot to setup a virtualhost to call the file..

Thanks for the help anyway :)