Welcome Guest, Not a member yet? Register   Sign In
php files as css files not working anymore
#1

[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)
#1 /home/example/domains/example.com/public_html/system/codeigniter/Common.php(256): CI_Exceptions->show_404('500.shtml')
#2 /home/example/domains/example.com/public_html/system/libraries/Router.php(239): show_404('500.shtml')
#3 /home/example/domains/example.com/public_html/system/libraries/Router.php(152): CI_Router->_validate_request(Array)
#4 /home/example/domains/example.com/public_html/system/libraries/Router.php(260): CI_Router->_set_request(Array)
#5 /home/example/domains/example.com/public_html/system/libraries/Router.php(131): CI_Router->_parse_routes()
#6 /home/example/domains/example.com/public_html/system/libraries/Router.php(50): CI_Router->_set_routing()
#7 /home/example/domains/example.com/public_html/system/codeigniter/Common.php(148): CI_Router->CI_Router()
#8 /home/example/domains/example.com/public_html/system/codeigniter/CodeIgniter.php(99): load_class('Router')
#9 /home/example/domains/example.com/public_html/index.php(115): require_once('/home/example/...')
#10 {main}
#2

[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?
#3

[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
RewriteCond $1 !^(index\.php|images|js|css|css/admin|video|ckeditor|kfm\-1\.4\.7|system/logs|plugins|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

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?
#4

[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?
#5

[eluser]tommo.wilson[/eluser]
Only this
Code:
$route['default_controller'] = "home";
$route['scaffolding_trigger'] = "";
#6

[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...efault.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.




Theme © iAndrew 2016 - Forum software by © MyBB