[resolved] URL discrepancy between localhost and live (2 posts)

  1. pszeinert
    Posted 6 years ago #

    I use a PHP IDE (Eclipse) for quick renderings of my site.

    My local files are stored at http://localhost/<strong>problemsite</strong>

    My live files are stored at http://<strong>problemsite</strong>.domainname.com

    The live site is set up as a sub-domain, but can also be typed http://www.domain.com/<strong>problemsite</strong>

    The problem is that when I define images, for example background in the imported CSS files, I can successfully load them using /wp-content/themes/thematic/library/imgs/file.gif

    ...however, on my local computer, the files will not resolve unless I absolutely link it as <strong>http://localhost/problemsite</strong>/wp-content/themes/thematic/library/imgs/file.gif

    I have tried any number of periods before the file and have scoured many sites before coming here. I even tried adding this snippet:

    define('WP_HOME', 'http://'.$_SERVER['HTTP_HOST'].'/problemsite');
    define('WP_SITEURL', 'http://'.$_SERVER['HTTP_HOST'].'/problemsite');

    to the wp-config.php file, but to no avail.

    This is the first problem I have encountered that I have not been able to find a resolution for.

  2. pszeinert
    Posted 6 years ago #

    Please disregard or delete.

Topic Closed

This topic has been closed to new replies.

About this Topic