Apache Laravel SSL.htaccess重定向到index.php

Apache Laravel SSL.htaccess重定向到index.php,apache,laravel,.htaccess,ssl,mod-rewrite,Apache,Laravel,.htaccess,Ssl,Mod Rewrite,我的laravel 5应用程序中存在重定向问题。我将.htaccess配置为与SSL一起工作-工作正常。问题是当我键入: example.com/page-应显示page路由,但浏览器重定向到https://example.com/index.php 当我在浏览器中键入完整地址时,如https://example.com/page路线运行良好,例如,在浏览器中,我看到我的页面路线(刀片,itp)。 有什么问题吗 我的.htaacess文件 <IfModule mod_rewrite.c&g

我的laravel 5应用程序中存在重定向问题。我将
.htaccess
配置为与SSL一起工作-工作正常。问题是当我键入:

example.com/page
-应显示
page
路由,但浏览器重定向到
https://example.com/index.php

当我在浏览器中键入完整地址时,如
https://example.com/page
路线运行良好,例如,在浏览器中,我看到我的
页面
路线(刀片,itp)。 有什么问题吗

我的
.htaacess
文件

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

    RewriteEngine On
    order deny,allow
    deny from all

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

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

    # Handle Authorization Header
    RewriteCond %{HTTPS} !=on
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

</IfModule>

选项-多视图
重新启动发动机
命令拒绝,允许
全盘否定
#如果不是文件夹,则重定向尾部斜杠。。。
重写cond%{REQUEST_FILENAME}-D
重写规则^(.*)/$/$1[L,R=301]
#处理前控制器。。。
重写cond%{REQUEST_FILENAME}-D
重写cond%{REQUEST_FILENAME}-F
重写规则^index.php[L]
#句柄授权头
重写cond%{HTTPS}=在…上
重写规则^https://%{HTTP_HOST}%{REQUEST_URI}[L,R=301]
只需在“手柄前控制器”前面写上“手柄授权头”


否则,如果存在http到https重定向,主前端控制器转换将无法实现。

正如@Amarnasan所提到的,但如果仍然不起作用,请删除浏览器的缓存,然后它应该会起作用

# Handle Authorization Header
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

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