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/admin
and is not logged in, Laravel redirects him or her tomydomain.com/public/login
instead ofmydomain.com/login
- when user authenticates himself or herself, Laravel redirects him or her to
mydomain.com/public/admin
instead 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