I added this rule into the .htaccess to redirect all the requests to the public folder:
RewriteRule ^(.*)$ /public/$1 [L,NC]
This way I can strip the public word from the URI, although both mydomain.com/home and mydomain.com/public/home would work.
I now implemented the basic user authentication but what happens is that:
- if user requests for
mydomain.com/adminand is not logged in, Laravel redirects him or her tomydomain.com/public/logininstead ofmydomain.com/login - when user authenticates himself or herself, Laravel redirects him or her to
mydomain.com/public/admininstead ofmydomain.com/admin
Based on this, I guess that Laravel, somewhere, explicitates that redirects must be made at /public/whatever. I tried to figure out where redirect() helper is explicitated but I couldn't find it. My questions are:
- Is my supposition right?
- If yes, where Laravel defines that the redirects must be made at
/public/whatever? Where I can findredirect()helper? - If no, why point 1 and 2 occur?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire