Jump to content

referencing sub-dirs of htdocs


pi_1

Recommended Posts

I have a problem referencing sub-dirs of htdocs in my html code.

 

This works fine:

src="images/pic.gif"

 

But This fails:

src="/images/pic.gif"

 

Unfortunately I have a lot of existing code which uses the second example's format (with the preceding slash). I need to configure my WAMP to work with this format.

 

I am installing WAMP to match the php + mysql versions on an existing web server. So I cannot change versions of php nor mysql. I am using:

Apache 1.3.37

PHP 4.46

MySQL 4.1.22

 

  • Can I configure Apache to work with this format: src="/images/pic.gif" ?
  • Or would another version of Apache work?

 

Thanks

Phil

Link to comment
Share on other sites

That should work fine. When you have / at the beginning of a file path it means root. / should tell Apache to request the file 'images/pic.gif' from the document root.

 

There may be a configuration issue or Apache1.3.x doesn't support it. I'm not sure I'll have a look at the Apache documentation.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.