Welcome Guest, Not a member yet? Register   Sign In
An application inside the website

I have a question when I have an application inside my website, how to configure the framework.
I installed the framework via composer and copied the designated folder to my application's folder, so I can have:

localhost/ -> my website
localhost/application -> an application from codeigniter framework

So, the application folder has all those folders from the framework, and I updated the $systemDirectory variable inside Paths.php.

When I run php spark serve inside application folder, the framework works and I got the welcome message. But when I am in my localhost/ and calls application/ then the application do not run and It shows me the files of the directory. Which configurations the codeigniter framework needs to run inside another website? When I want to run application from localhost/, I have to redirect the user to which directory?

Thanks in advance.

The content of /public should be in your /application folder, and everything else should be moved two folders up, so that people can't access them from localhost/.


I redirect to application/public and it worked, but the URI contains the "public" part.

I read the page that you put several times, but I don't want to put the app folder in other place. I wanted that my URI became localhost/application/ and not localhost/application/public.

I'm afraid that's the only way you can do it. It's the only way to get rid of /public url. You need to put index.php (and other files) in their public folder, in this case application. And everything else a directory up. Preferably two steps, as it's a security issue.

I'll try that today.

Maybe these videos on the brazilian YouTube channel DicasCodeIgniter could help you...

It worked. The URI does not contain the "public" anymore.

Theme © iAndrew 2016 - Forum software by © MyBB