In HTML view, css link code looks like this:
<link href='www.jedendzien.pl/assets/css/style.css' rel='stylesheet'>
but my browser is showing adress with double domain adress
www.jedendzien.pl/www.jedendzien.pl/assets/css/style.css
so i'm getting 403 error. I create link by
<link href='<?php echo base_url(); ?>assets/css/style.css' rel='stylesheet'>
and in config.php i'm setting:
$config['base_url'] = 'www.jedendzien.pl/';
In my XAMPP serwer everthing works fine but problem is appearig only on hosting server.
If i change $config['base_url'] = '' then adress looks and works ok but i still have problem with 403 error.
My .htaccess in root:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
Change permission of assets/css/style.css to 644
Change base url as follows
$config['base_url'] = 'http://www.jedendzien.pl/';
Or If you have a secure url,Then
$config['base_url'] = 'https://www.jedendzien.pl/';
Change .htaccess to
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With