http, https and relative links to resources
-
I am not challenging the fact that WordPress stores absolute URIs in the DB. What I am interested in is a way of circumventing this on a page of the site that requires https (the log in page). I figure I should be able to link to CSS and JS, using relative paths: /wp-content/themes/my-awesome-theme/js/my-elegant-script.js
I realize that enqueuing scripts and styles is the accepted way of getting such resources on the page, but in this case they would generate URIs under http.
Unfortunately, on https://my-domain I’m getting a bunch of 404 errors for CSS and JS included in the page using relative paths, wheres they show up just fine under https://my-domain
I realize this may not be a WordPress-specific problem, but that probably enough people have encountered it and solved it in WordPress so as to make this a worthwhile question.
Thanks and regards.
- The topic ‘http, https and relative links to resources’ is closed to new replies.