ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Stopping absolute URLs for files

August 25, 2011 11:45pm

Subscribe [3]
  • #1 / Aug 25, 2011 11:45pm

    ralph.m

    225 posts

    I find that all links to images and other files end up with absolute URLs in the HTML. I gather you can stop this from happening. Is the best way to do this to go to

    Admin > Content Administration > File Upload Preferences and simply change

    URL of Upload Directory   http://mysite.com/images/folder/

    to

    URL of Upload Directory   /images/folder/

    Is that the way to do it, or does that need to be a full URL on that preferences page?

  • #2 / Aug 26, 2011 12:40pm

    Marcus Neto

    1005 posts

    You can experiment with relative URLs. It should work. Sometimes hosting comes into play. For files you can also use an add-on to obfuscate the file path

  • #3 / Sep 01, 2011 5:12am

    ralph.m

    225 posts

    Thanks very much, Marcus, and sorry for the slow reply. It was recommended to me that I turn off absolute URLs for images etc, but I forgot to ask how, so was wondering if there was a better way than via file upload prefs, but it seems not. I’ll give it a try, then (server willing).

  • #4 / Sep 01, 2011 10:59pm

    Dan Decker

    7338 posts

    ralph.m,

    Relative paths can be used in any area that stores path information. Unfortunately, there is no “master preference” for paths in ExpressionEngine, they are very much on a location-by-location basis.

    Let us know if you have any further questions.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases