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/problemsit
My live files are stored at
https://problemsite.domainname.com
The live site is set up as a sub-domain, but can also be typed
https://www.domain.com/problemsite
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
https://localhost/problemsite/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.
Re-formatted post for clarity
- The topic ‘URL discrepancy between localhost and live’ is closed to new replies.