Page 1 of 1
Stylesheets not loaded when pretty url's active
Posted: Mon Oct 15, 2018 4:52 pm
by hdriezenlive
I have configured pretty url's (config.php, metadata-tag, htaccess), which does work alright. However, every page of the website, except for the home page, does not load any stylesheets.
When I switch pretty url's off, the stylesheets are there on all the pages.
Clearing cache does not help.
Any suggestions?
Thanks!
Re: Stylesheets not loaded when pretty url's active
Posted: Tue Oct 16, 2018 12:26 am
by DIGI3
What does the stylesheet tag show when you view the source code of the pages where it isn't working?
Re: Stylesheets not loaded when pretty url's active
Posted: Tue Oct 16, 2018 7:59 am
by hdriezenlive
Here's the stylesheet-bit from the source code from the page that is correct:
Code: Select all
<link rel="stylesheet" type="text/css" href="https://test2.website.nl/tmp/cache/stylesheet_combined_ae8568c9358fb1fa8e0c355fa547f0d8.css" media="screen" />
<link rel="stylesheet" type="text/css" href="https://test2.website.nl/tmp/cache/stylesheet_combined_49926b7e2d5798444257cbf3bfa3477d.css" media="handheld" />
<link rel="stylesheet" type="text/css" href="https://test2.website.nl/tmp/cache/stylesheet_combined_f2e147491963be3e98a80db6d28f402a.css" media="print" />
The other pages show this code:
Code: Select all
<link rel="stylesheet" type="text/css" href="http://test2.website.nl/tmp/cache/stylesheet_combined_a61846e06861022921692b1c955c0605.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://test2.website.nl/tmp/cache/stylesheet_combined_a11a8399997937589182744be35ba2bf.css" media="handheld" />
<link rel="stylesheet" type="text/css" href="http://test2.website.nl/tmp/cache/stylesheet_combined_b5f157c7ab65845c1f933f84adf3b788.css" media="print" />
The code from the pages that are not styled differ from the one page that is styled correctly.
And then, looking at this code, I suddenly saw that the second bit of code shows 'http' instead of 'https'.
I added the line
Code: Select all
$config['root_url'] = 'https://test2.website.nl';
to the config.php file, cleared cache of the website and the browser and everything is fine now.
Thanks for setting me on the right track!