dpp42324 2018-11-22 12:03
浏览 29

Laravel项目链接不在heroku上工作

I was given a laravel project I need to get up and running. I am new to laravel, but after allot of work, I believe I got everything configured properly and I deployed the project to heroku.

When I do artisan serve on my guest machine in my laravel project and go to the given url everything works fine all the links works. But I deploy it to heroku and my index page shows but none of the links work. I get:

Not Found The requested URL /register was not found on this server. 

It seems that running php artisan serve kinda activates the links, but how do I make that happen on heroku???

I should note the app is using blade.php files

What am I missing???

directory structure

This is in the /resources/views enter image description here

My _htaccess inside my public folder is as follows

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

I tried adding RewriteBase / doesnt help. I also tried changing htaccess to:

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 shape_predictor_68_face_landmarks.dat
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 对于相关问题的求解与代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料
    • ¥15 使用R语言marginaleffects包进行边际效应图绘制