Access third_party folder - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Model-View-Controller (https://forum.codeigniter.com/forumdisplay.php?fid=10) +--- Thread: Access third_party folder (/showthread.php?tid=70735) |
Access third_party folder - majortom84 - 05-22-2018 Hello, I am trying to add foundation css folder to my project under "third_party" folder but, I get an error depending on the path. Permissions are normal : rwxrwxr-x for folder and sub folders in third _party Server: Apache Path: "//mysite.com/application/third_party/foundation-6.4.2/css/app.css" gives a 404 Path: "href="<?php echo base_url(); ?>third_party/foundation-6.4.2/css/app.css" gives "Refused to apply style from 'https://mysite.com/third_party/foundation-6.4.2/css/app.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled." if moved to www/CI/assets/foundation I can access it just fine, but why can't I access anything in third_party ? ********** Edit add 12:53PM MT ************** .htaccess file RewriteCond $1 !^(index\.php|assets|images|js|css|uploads|favicon.png) RewriteCond %(REQUEST_FILENAME) !-f RewriteCond %(REQUEST_FILENAME) !-d RewriteRule ^(.*)$ index.php?/$1 [L,QSA] RE: Access third_party folder - ciadmin - 05-22-2018 A CSS framework, even if third party, should be somewhere inside your "public" folder, and not inside "application", no? RE: Access third_party folder - majortom84 - 05-22-2018 (05-22-2018, 12:30 PM)ciadmin Wrote: A CSS framework, even if third party, should be somewhere inside your "public" folder, and not inside "application", no? I assume so but, I am a little new at codeigniter and was not sure when I saw the framework under the third_party folder in another project. I will keep it under assets as it seems like the right thing to do. RE: Access third_party folder - InsiteFX - 05-23-2018 The .htaccess file in the ./application folders prevent access from them. RE: Access third_party folder - majortom84 - 05-26-2018 (05-23-2018, 03:13 AM)InsiteFX Wrote: The .htaccess file in the ./application folders prevent access from them. so, if I changed that file to "allow all" I can place things in the third_party folder and access them? RE: Access third_party folder - InsiteFX - 05-26-2018 No you should not change it, read the CodeIgniter User's Guide on the thirdparty folder. For you to have access like that you need to create a folder named assets in the same place that index.php is. /application /system /public or /public_html -- /assets index.php etc; |