0

I'm developing a laravel app and I need to force HTTPS for it.i've tried many other solutions that i found on the internet but none of them worked.is it possible that my app some how ignores htaccess rules?

i've already tried these solutions: Laravel: how to force HTTPS?

here's my httaccess file :

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

    RewriteEngine On
    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]

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

    # Handle redirect to Https
    RewriteRule ^(.*)$ https://foody.ir/$1 [R,L]

</IfModule>
2
  • Everything to https, even https to https? You are missing condition, like RewriteCond %{SERVER_PORT} 80. Commented Jun 5, 2019 at 13:51
  • no I meant http to https .I tested the thing you said and other solutions in the link above but it still doesn't work. Commented Jun 8, 2019 at 12:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.