F
F
Fet2016-09-13 14:09:19
Apache HTTP Server
Fet, 2016-09-13 14:09:19

How to set up htaccess for Laravel 5 so that the main domain is with https and www, and the subdomain is without everything?

Kind!
Tell me about setting
up htaccess
Now I have this:

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        #Options -MultiViews
    </IfModule>

    #SSL Enable
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule .* https://%{HTTP_HOST} [L,R=301]
    #Redirect to www.
    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule .* https://www.%{HTTP_HOST} [L,R=301]
    
  Options +FollowSymLinks
    # Redirect Trailing Slashes...
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]

</IfModule>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question