簡體   English   中英

laravel 5.6 沒有正確重定向

[英]laravel 5.6 not redirecting properly

我在一個子文件夾中設置了 laravel 5.6,但它給出了頁面沒有正確重定向的錯誤。 我已經用 htaceess 嘗試了一切。 我已經在根文件夾和公共文件夾中設置了 htacess 但它不起作用我的根 htaccess 是

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

RewriteEngine On

# 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]

</IfModule>

這是我的公共文件夾的 htacess

<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On    
RewriteBase /charity-frontmode/

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]

請幫忙! 提前致謝

嘗試以下

RewriteEngine on
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM