10-02-2009, 01:48 PM
[eluser]Unknown[/eluser]
I am currently working a php website, and I would like to have friendly urls (www.ellislab.com/forums/newtopic/53 instead of query strings (codeigniter.com?action=new_topic...).
I have succeeded in parsing the URI to obtain a matching controller, but when the template tries to load the CSS, it does it incorrectly.
For example, currently if I try to visit "www.example.com/index.php", the template will load the default controller and load the css in "resources/styles/default.css".
But if I try to visit "www.example.com/index.php/blog", it will indeed find the blog controller, but it will also try to load the css from "/index.php/blog/resources/styles/default.css".
I've thought about including the css inside the template, but that defeats the purpose of external css. I know codeIgniter definately has a way around this, and I also know the kind souls here know more about this framework than I do. Anyone care to share your thoughts on getting around this?
I am currently working a php website, and I would like to have friendly urls (www.ellislab.com/forums/newtopic/53 instead of query strings (codeigniter.com?action=new_topic...).
I have succeeded in parsing the URI to obtain a matching controller, but when the template tries to load the CSS, it does it incorrectly.
For example, currently if I try to visit "www.example.com/index.php", the template will load the default controller and load the css in "resources/styles/default.css".
But if I try to visit "www.example.com/index.php/blog", it will indeed find the blog controller, but it will also try to load the css from "/index.php/blog/resources/styles/default.css".
I've thought about including the css inside the template, but that defeats the purpose of external css. I know codeIgniter definately has a way around this, and I also know the kind souls here know more about this framework than I do. Anyone care to share your thoughts on getting around this?