3s2ng Posted March 29, 2007 Share Posted March 29, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/44754-slash-is-not-working/ Share on other sites More sharing options...
steviewdr Posted March 29, 2007 Share Posted March 29, 2007 I dont see a problem. Its a case of using "RELATIVE" versus "Absolute" file paths. http://www.google.ie/search?hl=en&q=relative+file+paths&meta= -steve Quote Link to comment https://forums.phpfreaks.com/topic/44754-slash-is-not-working/#findComment-217534 Share on other sites More sharing options...
3s2ng Posted March 30, 2007 Author Share Posted March 30, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/44754-slash-is-not-working/#findComment-217959 Share on other sites More sharing options...
steviewdr Posted March 30, 2007 Share Posted March 30, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/44754-slash-is-not-working/#findComment-217971 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.