Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Relative path vs full path for images and PDF links
#1
Hi,

I don't know if there is a fix or not but the only way, I suppose, is to ask. I've searched the forum but havn't found any posts directly related to this issue or if there is a fix.

I've noticed that the path to any image or link to a PDF has the full path inserted eg http://mydomain/data/uploads/image.jpg and I can see why it's like this. I assume that when in admin the relative path would be different than the front end therefore the fix would be to insert the full path which would always be correct.

The problem I have (and I don't know if other people have this issue as well) but when developing websites I use a localserver (XAMPP in my case) and I design as much as possible locally for convenience and speed and so I don't need to upload to my server to see any change.

Of course as you have probably guessed - when my website is finished and the pages are uploaded to the server (I usually use a demo location first for the client to approve etc) the hard coded links are not changed and all images and PDF links are don't work because they are pointing to http://localhost/. . .

The solution I have is to find and replace text strings in the XML files so it points the correct spot on the web server. I then have to do this a second time when the site is moved the LIVE location.

I'm just wodering if other poeple have come accross this issue? If there is a workaround of sorts or (the best solution) if using some smart programing detect that a user is in ADMIN and therefore the path would different than if in the front end.

Any thoughts?
Reply


Messages In This Thread
Relative path vs full path for images and PDF links - by stryker - 2012-02-24, 16:33:19



Users browsing this thread: 2 Guest(s)