• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 296
  • Last Modified:

Access a folder complete outside PHP CodeIgnitor Application on same domain.

Hi experts,

I would like to have a folder with complete independent files inside the same root as I have already a codeignitor applicatoin but I cant get it work.

My root folder has a folder called /application/ where the main application is saved.
/home/user1/public_html/application/

and I would like to have now other .php filer which have nothing to do with the main application in a sub directory like this
/home/user1/public_html/mystuff/

Inside this folder might be other sub folders as well as several .php files.

When I try to access them now like: www.mydomain.com/mystuff/ I get CodeIgnitor file not found errors.
How do I have to do this in order to get this work?

thanks in advance
0
Oliver2000
Asked:
Oliver2000
  • 2
1 Solution
 
Ray PaseurCommented:
This sounds like expected behavior to me.  Codeigniter controls the routing of the requests.  These requests are served by scripts that are part of public_html/application.  So it seems logical that Codeigniter would not be aware of URL routes that are outside of its purview.  You can learn more about the way it works here:
https://ellislab.com/codeigniter/user-guide/general/managing_apps.html
https://ellislab.com/codeigniter/user-guide/general/routing.html

If you want to have a new route, you can add it to the existing routes.  Then you can put your "mystuff" files in a directory that responds to the new route.  If this is information that you want to protect, you can use authentication to password-protect the contents of the directory.  This article has some more information that might be useful.
http://code.tutsplus.com/tutorials/working-with-restful-services-in-codeigniter-2--net-8814
0
 
Oliver2000Author Commented:
Thank you, this helped me already. I checked the links you added and found what i was looking for.
0
 
Ray PaseurCommented:
Thanks for the points and thanks for using E-E.  And best of luck with your project! ~Ray
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now