Jump to content

slash is not working


3s2ng

Recommended Posts

Hello Freaks.

 

I'm having a problem in my localhost.

 

when I make a path of the image to look like this <img src='/images/test.gif'> it will not work and it is interpreted as http://localhost/images/test.gif

 

but if I make it <img src='images/test.gif'> with out the slash it works and this can be interpreted as

http://localhost/myapp/images/test.gif

 

Can anybody help me with this. I cant find the solutions for this.

 

Thanks,

MARK

Link to comment
Share on other sites

Thanks steviewdr,

 

Yes thats the problem. I downloaded the whole website from the live server into my localhost and then when I run into my localhost the images are not showing but it is showing in my server.

 

I'm using Xampp here in my localhost. Are there any configuration in the httpd.conf about this issue?

 

Regards,

MARK

Link to comment
Share on other sites

You might have to setup a virtual host on a new domain, e.g.:

www.newdomain.com

 

Then you can put the images dir there so they will all be picked up with:

 

/images/image1.jpg

 

Apart from that - a simple find and replace in your html might fix issues with image paths. Find "/  replace with "

 

-steve

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.