What php variable is the path to the views folder? |
Yes I'm using a htaccess file.
When I access a stylesheet in the views folder I get Error 403 Access Forbidden
config.php
Code: $config['base_url'] = 'http://localhost/ticketclaw'; .htaccess Code: RewriteEngine On
When using the htaccess rewrite you should remove the value from
PHP Code: $config['index_page'] = '';
I've set it to blank now I'm using .htaccess but I still get Error 403 Forbidden when I try to open a stylesheet.
Are you using an assets directory that is placed in the root?
application --config --controllers --... assets system index.php .htaccess
(06-23-2017, 06:34 AM)desbest Wrote: No it's in the views folder, a stylesheet in the views folder. You can not and should not do that. Direct access to the views folder is blocked by the index.html file that is in the views directory Normally you keep all your assets in an assets folder. Then in your htaccess file you add that assets folder to the ignore list on the rewrite That will prevent any url starting with assets to be routed through the index.php file Code: # an ignore list. If any one of these is the the request it will not be routed to the index.php
I still can't get it to work. It says error 403 access forbidden.
Code: <link rel="stylesheet" href="<?=base_url('application/assets/');?>stylesheet.css" type="text/css"> Code: RewriteEngine On Code: <link rel="stylesheet" href="http://localhost/ticketclaw/application/assets/stylesheet.css" type="text/css">
Place the assets folder in your root so your link becomes
Code: <link rel="stylesheet" href="http://localhost/ticketclaw/assets/stylesheet.css" type="text/css"> |
Welcome Guest, Not a member yet? Register Sign In |