2
我總是對我的應用程序使用Forge,但客戶堅持要保留他的GoDaddy。正如我討厭GoDaddy,我堅持路由問題。在主頁的作品買我的API獲得404Laravel Godady在路線上返回404
結構
的public_html
->htaccess
->index.php
->css
->js
->images
->laravel/
->all core stuff
的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]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
我知道它可能是一些的.htaccess的事情,因爲在Laravel結構具有改變。任何人都知道嗎?
將您的'RewriteRule'改爲'RewriteRule ^(。*)$ index.php?/ $ 1' – Nawin