I am having a problem loading a javascript or css or any other file from inside the application/modules directory.
I am using MAMP and CodeIgniter with HMVC and trying to have a js and css folders inside a module folder. Then when I am calling the controller methods I am also loading the asset files.
I have other sites that are working in that way. The structures are the same and the CodeIgniter versions are the same. Basically I have copied the previous website and started from there.
But it always returns 403 forbidden.
What I did but still nothing changes:
The apache log says "[Tue May 22 17:24:30 2012] [error] [client 127.0.0.1] client denied by server configuration"
Here is the .htaccess file:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
At the same time everything is fine with the other site.
I have spent many hours so far and I am stuck.
Any thoughts or suggestions are appreciated.
Thanks,
CodeIgniter comes with a .htaccess in the /application
directory which contains
Deny from all
You'll need to remove this file or change it's ruleset to access js/css files etc from anywhere inside application/*
It is however largely inadvisable to allow access entirely to the application, it's perhaps best to modify this .htaccess file to allow access to application/modules/*/css|js/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With