![]() |
php files as css files not working anymore - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: php files as css files not working anymore (/showthread.php?tid=37505) |
php files as css files not working anymore - El Forum - 01-11-2011 [eluser]tommo.wilson[/eluser] Hi, I used to be able to do this... Code: <link rel="stylesheet" type="text/css" media="screen" href="<?=base_url()?>css/admin/admindefault.php"> This allowed me to use variables in my css files. But for some reason it stopped working... It now displays a 404 error instead. The file is still there so I can't see what's wrong with it. Has anyone got any ideas about why this is happening? I have this call trace if it helps...??? Code: #0 /home/example/domains/example.com/public_html/system/libraries/Exceptions.php(97): MY_Exceptions->show_error('404 Page Not Fo...', 'The page you re...', 'error_404', 404) php files as css files not working anymore - El Forum - 01-11-2011 [eluser]Atharva[/eluser] Have you recently added .htaccess? Can you provide us any link where we can see this page? Also, what is the base-url set in config.php? php files as css files not working anymore - El Forum - 01-11-2011 [eluser]tommo.wilson[/eluser] No i haven't recently added .htaccess although I do have a .htaccess file. Here are the contents of it. Code: RewriteEngine on Here is a url for the login page... http://www.bringitonline-webdesign.co.nz/admin ... as you can see the stylesheet is not found for this page. The base-url in the config is... Code: $config['base_url'] = "http://www.bringitonline-webdesign.co.nz/"; I have recently switched to a new server. Might there be something there that would have an effect? php files as css files not working anymore - El Forum - 01-11-2011 [eluser]Atharva[/eluser] It's not with css only, I see that even folders like js/images are not accessible. CI is routing the css to a controller (which I think does not exists). Have you set any rules in your routes.php? php files as css files not working anymore - El Forum - 01-12-2011 [eluser]tommo.wilson[/eluser] Only this Code: $route['default_controller'] = "home"; php files as css files not working anymore - El Forum - 01-12-2011 [eluser]tommo.wilson[/eluser] I've done some more digging around and I think that my server won't allow the browser access to the files it needs... ie: http://www.bringitonline-webdesign.co.nz/css/admin returns a 403 error http://www.bringitonline-webdesign.co.nz/css/admin/admindefault.php returns a 500 error I presume this is for security measures (ie stop people browsing around folders etc.) but is there some way around this? I have full access to the server so I would just need to know what to do. |