Question: I'm aware this is similar to numerous existing posts but after looking at a number of others I wasn't able to solve my problem. I'm attempting to load a folder full of html files I've been supplied with. I didn't write them but I have been modifying them to integrate them into an existing system.

I've tried three ways of opening them, with varying success:

1) Simply right click on 'index.html' and go 'open with' and select a browser. This works perfectly!

2) Place the whole folder contents, unchanged, onto my server under 'public\_html/cat/html' and navigating to the url 'localhost/cat/html/index.html'. This returns a '404 page not found error'.

3) The strange one. Place the html files in the 'application/view' folder, separate the included css and javascript files and place them in existing folders 'public\_html/css' and 'public\_html/js' and update the links to them in the html files appropriately. These now look something like:

```
<link type="text/css" href="css/cat/style.css" rel="stylesheet" />

```

If I load this page by running a function that uses CodeIgniter's $this->load->view(...) function it finds the index file but loads it with no css and with broken links to the other pages. I've explored the page source and seen that the link is exactly as above but clicking gives an error that reads "404 Not Found...The requested URL /css/cat/style.css was not found on this server".

I've attempted to use the base\_url() function (and site\_url()) like this:

```
<link type="text/css" href="<? base_url('css/cat/style.css') ?>" rel="stylesheet" />

```

and it yields the same result on the surface but examining the page source reveals the link line has become:

```
<link type="text/css" href="" rel="stylesheet" />

```

which seems to be even worse!

Any hints?

Thanks for reading

Answer: 
Try the following:

```
<link type="text/css" href="<?php echo base_url('css/cat/style.css') ?>" rel="stylesheet" />

```

base\_url() functon simply return value, you should take a care for displaying returned value to output! :-)
Or shorthand

```
<link type="text/css" href="<?=base_url('css/cat/style.css') ?>" rel="stylesheet" />

```

Then view your page source and copy the link from there to your browser, see if you can access it.