.css file doesn't get carried out

napor

New Member
Style.css doesn't get carried out when url is \[code\]http://example.com/mvc/login/requestsExceeded\[/code\],but it does in my login index page that is \[code\]http://example.com/mvc/login\[/code\],if I add forward slash \[code\]http://example.com/mvc/login/\[/code\], then it doesn't work either.\[quote\] mvc = site in subdirectory
login = controller
requestsExceeded = view\[/quote\].css file is in \[code\]http://www.example.com/mvc/views/themes/default/style.css\[/code\] The file path is ok becouse i've tryed like this:\[code\]<?php if(file_exists("views/themes/{$theme}/style.css")) echo 'TEST'; ?><link href="http://stackoverflow.com/questions/15684636/views/themes/<?=$theme;?>/style.css" type="text/css" rel="stylesheet" />\[/code\]and it does echo out TEST.Here my simplified router:\[code\]<?php$controller = "Index";$action = "index";$query = null;if (isset($_GET['load'])){ $params = array(); $params = explode("/", $_GET['load']); $controller = ucwords($params[0]); if (isset($params[1]) && !empty($params[1])) { $action = $params[1]; } if (isset($params[2]) && !empty($params[2])) { $query = $params[2]; }}$modelName = $controller;$controller .= 'Controller';$load = new $controller($modelName, $action);if (method_exists($load, $action)){ $load->{$action}($query);}else { die('Invalid method. Please check the URL.');}\[/code\]I'm pretty sure that this is caused by .htaccess file:\[code\]RewriteEngine OnRewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ index.php?load=$1 [PT,L]\[/code\]-I would like to restrict all access unless index.php...,
-Allow access to .css,.gz,.js and image files,
-remove the forward slash from url,
-redirect 301 to index.php,
-redirect \[code\]http://example.com/mvc/home\[/code\] to index.php, Help would be appreciated!
 
Back
Top