2017-02-23 3 views
0
RewriteRule ^(.*)$ public/$1 [L] 

Wie umleiten diese (Meine Seite in Unterordner liegt)
Wie alle Routen umleiten https sein?Redirect alle Routen zu https/ssl in Laravel mit .htaccess

ist dies ok

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

Antwort

0

Sie diese Regel vor Ihrer aktuellen verwenden können.

RewriteCond %{HTTPS} !=on 
RewriteRule^https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] 
+0

siehe aktualisiert – Nikanor

1

versuchen dieses

RewriteCond %{HTTPS} off 
# First rewrite to HTTPS: 
# Don't put www. here. If it is already there it will be included, if not 
# the subsequent rule will catch it. 
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] 
# Now, rewrite any request to the wrong domain to use www. 
# [NC] is a case-insensitive match 
RewriteCond %{HTTP_HOST} !^www\. [NC] 
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]