Welcome Guest, Not a member yet? Register   Sign In
CSS & Javascript not working on all pages
#1

[eluser]eperez[/eluser]
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: http://avertsoftware.com/

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

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?

Thanks
#2

[eluser]JHackamack[/eluser]
You're linking to relative directories:
"css/style.css"

rather than "/css/style.css"
#3

[eluser]theprodigy[/eluser]
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
Code:
<link media="screen" type="text/css" href="css/style.css" rel="stylesheet">
It needs to be changed to
Code:
<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.
#4

[eluser]eperez[/eluser]
That's perfect guys! You were both spot on!

Thanks a a lot for the help Smile




Theme © iAndrew 2016 - Forum software by © MyBB