Ok, so I have a project I'm working on: http://www.d2burke.com/exp/intern/
BaseURL is set to: '/exp/intern/'
.htaccess reroutes to /exp/intern/index.php
I have custom routes set up for
http://www.d2burke.com/exp/intern/questions --
$route['apply'] = "internship/apply";
开发者_如何学JAVAhttp://www.d2burke.com/exp/intern/apply --
$route['questions'] = "internship/questions";
etc.
When you go to http://www.d2burke.com/exp/intern/internship/questions, all is well and the normal tan background shows up...
When you use one of the custom routes...you get the background image from my main site...? what is the world is going on?
You seem to overwrite the background by loading an extra style sheet in the body content like so
<link rel="stylesheet" href="../../css/style.css" />
The browser interprets this as a relative path to your page path.
In the internship/questions page, this relative page translate to http://www.d2burke.com/exp/css/style.css, which doesn't exists.
The fix would be to use an absolute path like /css/style.css
Note: It's pretty obvious if you use Firebug and check the Net tab
EDIT: Alternatively, open Firebug, click the arrow in the Console tab and enable "Show Network Error". That way any 404 error will appear in your console and come up as an error (great debug feature)
精彩评论