Routes Not Working On Live Host ?!!!!! |
hello guys i have problem with Route on real host .every thing work well on localhost but on live host my routes didnt work here my code ? help ci4 funs
PHP Code: <?php
Enlightenment Is Freedom
Maybe not the cause of your problems, but you should probably disable AutoRoute:
PHP Code: $routes->setAutoRoute(false); Is your file structure the same on local and live host? (public directory...?) (04-17-2021, 04:23 PM)includebeer Wrote: Maybe not the cause of your problems, but you should probably disable AutoRoute: (04-17-2021, 04:23 PM)includebeer Wrote: Maybe not the cause of your problems, but you should probably disable AutoRoute: I didnt change structure I try acesss like that Www.exmple.com/public/api/auth/login Login method is POST request is not working but Logout method is GET request is working When setautorute to false still i got error too either
Enlightenment Is Freedom
You're not suppose to have the public folder visible like that. That probably means that all the other folders that are supposed to be outside the document root are not.
(04-18-2021, 05:47 AM)includebeer Wrote: You're not suppose to have the public folder visible like that. That probably means that all the other folders that are supposed to be outside the document root are not.Look dude i have two apps frontend angular 11 which index. Html(root to path www/index. Html) backend ci4 index. Php (root to path www/public/index. Php) See backend and fronend are seprate it its full stack app On local host i access shell cmd Can run php spark serve then init https://localhoat:8080 but live host i dont acess shell cmd I got this path www.exmple.com/public/ Then can call restfull controllers okey
Enlightenment Is Freedom
If CI is only used as backend, you should probably set a subdomain like api.example.com and have your backend (CI) and frontend (Angular) separated with their own domain. The public folder is your document root, it should not be inside the document root with all other files. And don't tell me "look dude" like I'm stupid. You didn't even mention you had 2 separated apps for the front and back.
(04-18-2021, 06:57 AM)includebeer Wrote: If CI is only used as backend, you should probably set a subdomain like api.example.com and have your backend (CI) and frontend (Angular) separated with their own domain. The public folder is your document root, it should not be inside the document root with all other files. And don't tell me "look dude" like I'm stupid. You didn't even mention you had 2 separated apps for the front and back.Oky my friend i didnot mean anthing about using dude in post sorry about it angular its not in Document root(public folder) it s in upper folder there is no conflict between two index . ci4 version 4.0.4 dose have problem since i use 4.1.1 i got error on live host
Enlightenment Is Freedom
(04-18-2021, 06:57 AM)includebeer Wrote: If CI is only used as backend, you should probably set a subdomain like api.example.com and have your backend (CI) and frontend (Angular) separated with their own domain. The public folder is your document root, it should not be inside the document root with all other files. And don't tell me "look dude" like I'm stupid. You didn't even mention you had 2 separated apps for the front and back. you ware rright man it needs subdomain api.example.com vi4 upload in subdomain then upload angular app exmple.com now every thing okay
Enlightenment Is Freedom
|
Welcome Guest, Not a member yet? Register Sign In |