You need to avoid using relative paths when linking to images/css/etc in your views.
As an example, when you use assets/images/logo.png
(relative path) from the page http://domain.com/devices/devices
, the browser looks for http://domain.com/devices/assets/images/logo.png
Using the same image path with the page http://domain.com/devices
the browser will look for http://domain.com/assets/images/logo.png
instead.
When specifying urls to pages, images, etc within your domain, use the URL helper functions to automatically format your urls.
You want to avoid writing urls like this:
<script type="text/javascript" src="./assets/js/jquery.js"></script>
<img src="assets/images/logo.png" alt="" />
And instead generate your urls like this:
<script type="text/javascript" src="<?php echo base_url('assets/jquery.js'); ?>"></script>
<img src="<?php echo base_url('assets/images/logo.png'); ?>" alt="" />
Which will output:
<script type="text/javascript" src="http://domain.com/assets/js/jquery.js"></script>
<img src="http://domain.com/assets/images/logo.png" alt="" />