dimanche 22 juillet 2018

Laravel redirect from https:// to https://www

I am new in laravel framework now i'm working fully developed website using laravel. i could't redirect website https:// into https://www. i changed htaccess file like

 <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$
    RewriteCond %{HTTPS}s ^on(s)|
    RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]               
    </IfModule>

And

 <IfModule mod_rewrite.c> 
    RewriteEngine on
    RewriteCond %{HTTPS} on
    RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC]
    RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]  

    </IfModule>

It's based on .env file or need to add any controller.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire