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

Hello,
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.
Reply
#2

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/.

https://codeigniter.com/user_guide/gener...-directory
Reply
#3

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

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.
Reply
#5

I'll try that today.
Reply
#6

Maybe these videos on the brazilian YouTube channel DicasCodeIgniter could help you...
https://www.youtube.com/watch?v=j35B_N-pb-Y
https://www.youtube.com/watch?v=me7OsokVw00
Reply
#7

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




Theme © iAndrew 2016 - Forum software by © MyBB