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>
mr_simti
  • 9
  • 1
  • 9
  • Everything to https, even https to https? You are missing condition, like `RewriteCond %{SERVER_PORT} 80`. – m1k1o Jun 05 '19 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. – mr_simti Jun 08 '19 at 12:10

0 Answers0