user1745467
user1745467

Reputation: 67

allow access to certain php files in codeigniter

i have tried all the other similar questions and cant find a solution for this

Im running codeigniter and need to allow a few php files to be viewable and accessible (well they are infact compressed javascript files whaih are made by a compression library)

so basically i have this included on the page : /tmp/master_top_jsCBM1_1_applicant_js.php

this file does exist but i get a 404 Page Not Found

in the .htaccess i have this :

RewriteEngine on
RewriteCond $1 !^(index\.php|assets|mobile|tmp|fonts|images|js|site|css|robots\.txt|^(.*).css|(.*).jpg|(.*).js)
RewriteRule ^(.*)$ index.php/$1 [L]

notice that i have the 'tmp' folder accessible here and this is where all those php/javascript files are !

strangely this works on my local MAMP yet not on the server :(

Thanks for any suggestions

Upvotes: 0

Views: 532

Answers (1)

theEUG
theEUG

Reputation: 409

I don't think your .htaccess file is the cause of your problem. Check the href attribute of the <link> tag in your header. The value of the hrefshould point to where your .js files are located. If this path is wrong you will get a 404 error meaning the /path/to/the/file does not exists

Upvotes: 2

Related Questions