Created
January 12, 2018 12:21
-
-
Save joelsantosbr/2be1ede13176785e8b2243f05b5f17a5 to your computer and use it in GitHub Desktop.
Redirecionar Laravel para pasta Public e com HTTPS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Redireciona para o HTTPS independente do domínio | |
| RewriteCond %{HTTPS} off | |
| RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,QSA,L] | |
| # Remove www. no prefixo do domínio | |
| RewriteCond %{HTTP_HOST} ^www\.(.*) [NC] | |
| RewriteRule ^ https://%1%{REQUEST_URI} [R=301,QSA,L] | |
| # Redirecionar para pasta public | |
| RewriteEngine On | |
| RewriteRule ^(.*)$ public/$1 [L] |
Obrigado amigo! Me ajudou muito!
Boa tarde, me traz uma luz amigo, amei seu código, porém tenho dois sites no mesmo cpanel, um esta na pasta public_html mesmo, já o outro esta em uma sub-pasta, como faço? Grato desde já.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Salvou o meu dia! 😎 Parabéns!