URL discrepancy between localhost and live
-
I use a PHP IDE (Eclipse) for quick renderings of my site.
My local files are stored at
https://localhost/<strong>problemsite</strong>
My live files are stored at
https://<strong>problemsite</strong>.domainname.com
The live site is set up as a sub-domain, but can also be typed
https://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>https://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', 'https://'.$_SERVER['HTTP_HOST'].'/problemsite'); define('WP_SITEURL', 'https://'.$_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.
- The topic ‘URL discrepancy between localhost and live’ is closed to new replies.