Welcome Guest, Not a member yet? Register   Sign In
Access third_party folder
#1

(This post was last modified: 05-22-2018, 11:53 AM by majortom84.)

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]
Reply
#2

A CSS framework, even if third party, should be somewhere inside your "public" folder, and not inside "application", no?
Reply
#3

(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.
Reply
#4

The .htaccess file in the ./application folders prevent access from them.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#5

(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?
Reply
#6

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;
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB