CodeIgniter Forums

Full Version: CSS & Javascript not working on all pages
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

My site was recently compromised. I'm not a web developer, but through some guidance here and at another site I've pretty much fixed everything so far, except for one small issue.

This is my site:

If you click on the "Download" link for instance, it will take you to the download page. ie:

CSS and Javascript load just fine. But if you click on any of the links under "Info", which is in a subdirectory called "info", they don't load the Javascript and CSS. The HTML on each page is identical to the working pages. I even copied a working page, renamed it to one of the others and tried it. It turned out just the same.

This leads me to believe that something was changed in the code igniter files.

Does anyone have any ideas about where I should look to see what has been changed? Or maybe something similar?


El Forum

You're linking to relative directories:

rather than "/css/style.css"

El Forum

you need to look in application/views.
Depending on how your web developer set it up, you may have a header.php file, or a template.php file, or something along those lines.

What you need to do is find the file that contains the top portion of your pages, and search for this code
<link media="screen" type="text/css" href="css/style.css" rel="stylesheet">
It needs to be changed to
<link media="screen" type="text/css" href="/css/style.css" rel="stylesheet"> //notice the text inside the href="". I put a / in front of css

Without knowing exactly how it is setup, it's hard to tell you what to do.

If you can't find one of the files I mentioned, then take the content of one of your controllers (inside application/controllers), and paste it here. That should at least direct me to the questions I need to ask.

El Forum

That's perfect guys! You were both spot on!

Thanks a a lot for the help Smile