lundi 4 juillet 2016

Laravel website permanent https redirection and remove 'public' from url with htaccess

I have removed public word from url by applying following code in .htaccess

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

It is working undoubtedly. But also trying to set permanent redirection http to https. Using following code in .htaccess:

RewriteEngine on
RewriteCond %{HTTPS} !^on
RewriteRule ^(.*)$ public/$1 [L]
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Please tell me where is the issue? It should remove public folder from url as well as permanent redirection to https URL



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire