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.

Using WAMP to develop locally, breaks links when viewing remotely

October 18, 2011 2:01pm

Subscribe [2]
  • #1 / Oct 18, 2011 2:01pm

    feeneywireless

    20 posts

    This question may be related to a resolved thread.

    I have a similar issue, but when I try to remotely view my EE website, which is on a WAMP development server, I lose all my images.  When I take the {site_url} out of the links, they break as the URL’s change. 

    I know what the issue is, basically that the URL on my local machine has to have localhost, but when I view it on a remote device, it has to have the IP to connect.  That breaks the URLS’s.  Is there a simple fix for this that I am missing?  Thanks in advance for any help!

  • #2 / Oct 19, 2011 11:17am

    Mark Bowen

    12637 posts

    Hi feeneywireless,

    The easiest way to fix this would be to code your links in this way instead :

    /images/my_images/image_one.jpg

    Note the leading slash before the path

    This should then allow links to load from the root of your site and get around any problems you are having.

    Unfortunately providing information on setting up servers like this is outside the scope of our support here so I’m going to move this thread over to the Community Help forums to hopefully get a few more eyes on this one for you.

    Thanks,

    Mark

     

  • #3 / Oct 21, 2011 4:14pm

    feeneywireless

    20 posts

    Sorry this took so long to get back to you!  Actually adding the backslash didn’t work but I think the problem is that I have to have the http://localhost as part of the URL in my control panel and that is what is messing everything up. I am going to be moving it to a live staging server so once I finish that, it should be good to go! Thanks for your help though!

  • #4 / Oct 25, 2011 11:29am

    feeneywireless

    20 posts

    OK, so I found a quick solution to this that may or may not work for anyone that has the same error.

    1. Go to ADMIN > GENERAL CONFIG
    2. Find ‘URL to the root directory of your site’
    3. Change ‘localhost’ to whatever you ip address is. (Something like 111.111.1.11)
    4. I would not change it on the next two just in case.  IP Addresses can change, so it is a lot easier to fix it if you keep the theme and the admins pointing to localhost and no the ip.

    Anyway, that worked for me yesterday until I got to work today and my IP had changed. So I am not sure if there is a better/more permanent solution, but that worked for me for the time being. Thanks and I hope this helps someone else!

    Oh, and this was on EE version 2.2.2 just in case something changes in the future…

  • #5 / Oct 25, 2011 12:28pm

    feeneywireless

    20 posts

    Also, make sure you update any of your file upload preferences if you had issues with images updating.

    1. Go to CONTENT > FILE UPLOAD MANAGER
    2. Select ‘edit’ (pen icon) by any of your current preferences you want changed or changed back
    3. Update ‘URL of Upload Directory’ to include your IP address
    4. Submit changes

    With either of these if you need to switch back just reverse the steps and add localhost wherever your IP Address is located.

    Oh, and all of these changes are assuming you are using the base configuration of WAMP Version 2.1.  Hope this helps!

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

ExpressionEngine News!

#eecms, #events, #releases