-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have an Issue with multiple Apps #60
Comments
Create an additional .htaccess file in each application, i.e. myapp1/.htaccess that contains the following:
This will rewrite the URL to remove "public". Then, in the .htaccess file inside the application, add a RewriteBase line that contains the folder name, so myapp1/public/.htaccess would look like this:
This will let you have more than one project, and the URLs will be localhost/myapp1/posts/index and so on. You'll have to take the subfolder into account with links and redirects inside the application. |
Sorry I forgot to mention I use nginx and I am not using public folder, directly using index file from root folder http://mydomain/app1/Home/Index http://mydomain/app2/Home/Index can you please help me on index.php and routes.php so it should take namespace, controller and action and i need when the website loaded it should go for app1/Home/Index here i will check the session and redirect to login and after logging i will render the app1/Home/Index i am totally confused how i can do this |
I haven't tried it on nginx, but you can add a route that includes a fixed part that includes a namespace in the parameters, e.g.
Is that what you meant? |
can you please tell me one thing without adding the route it wont work ? |
I'm afraid I don't understand what you mean, please can you give me more details? |
Hello, I am trying to put the route into operation on a web server, but when I send the user and the password, the following appears in the route: %7B%7B%20route%20%7D%7D/login/index I don't know if it is related to the .htaccess since the application is not found in the root directory. Thanks for your help. |
Decoded, that's this code:
it looks like Twig isn't installed, so the web server isn't interpreting the Twig code. Did you copy the vendor folder to the live web server? |
Thanks, in this line I had the error
|
Hi i tried you project without twig and composer.
I have few issues that i need to check the user logged in or not first, and there are seperate apps i am working now on same webapp, it means
App 1: localhost/myapp1/
App 2: localhost/myapp2/
i am totally confused how to router them properly and user login wont do with the mysql db it done with another api
can you please suggest me how to route to them default to my login page in the root folder i am not using the public folder anyway, and how to route to my multiple apps
i have done some working with procedural php but i want to do it in MVC. Please help me on this.
The text was updated successfully, but these errors were encountered: