Reputation: 337
After redirecting the page the css and js which are stored in the assets folder, is not getting fetched in that redirected page.
Here is the code to redirect the page, the name of this page is interior.php
<a class="viewall pull-right" href="<?php echo base_url("details/profile/".$article->type_id); ?>">
The page it is getting redirected to is profile.php, here is the css link in this page:
<link rel="stylesheet" href="../assets/css/style.css"/>
Along with the css and js, I am also not getting the images stored in the img folder inside Assets folder. The assets folder is inside the application folder at the same level as views folder.
Upvotes: 2
Views: 1273
Reputation: 785
Instead of using relative URLs, use absolute URL. You can use base_url()
to achieve this in the following manner:
<link rel="stylesheet" href="<?php echo base_url('assets/css/style.css'); ?>"/>
For the above code to work, you need to move your assets folder into the base directory (one level above application).
Upvotes: 2