简体   繁体   English

将 Laravel 项目上传到 Godaddy 子域

[英]Uploading Laravel Project To Godaddy Subdomain

I am trying to upload a project I built following a Laravel tutorial.我正在尝试上传我按照 Laravel 教程构建的项目。 I have a cpanel account with shared hosting with Godaddy.我有一个与 Godaddy 共享主机的 cpanel 帐户。 My portfolio is in the public_html folder so I'm trying upload the project to a subfolder.我的作品集位于 public_html 文件夹中,因此我正在尝试将项目上传到子文件夹。 I've created a directory on the same level as the public_html to hold the laravel files and I've created a subdirectory in the public_html folder with the files from the public folder.我创建了一个与 public_html 相同级别的目录来保存 Laravel 文件,并且我在 public_html 文件夹中创建了一个子目录,其中包含来自 public 文件夹的文件。 If I go the home page the application comes up.如果我转到主页,应用程序就会出现。 Here's a link to the project http://thetravisdavis.com/lsapp/这是该项目的链接http://thetravisdavis.com/lsapp/

I'm able to see the homepage of the project but I'm getting Internal Server Error when I try to visit any other pages like http://thetravisdavis.com/lsapp/about我可以看到项目的主页,但是当我尝试访问任何其他页面(如http://thetravisdavis.com/lsapp/about)时出现内部服务器错误

This is my .htaccess file这是我的 .htaccess 文件

Options +MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /lsapp/$1
#RewriteRule ^ index.php [L]
RewriteRule ^([^\.]+)$ $1.php [NC,L]

Any help would be greatly appreciated.任何帮助将不胜感激。 I've looked at multiple tutorials and similar questions here but most if not all seem to be outdated.我在这里查看了多个教程和类似的问题,但大多数(如果不是全部)似乎已经过时。 Again thank you for any help you may be able to provide.再次感谢您提供的任何帮助。

After a little more googling I found some documentation on what was wrong with my .htaccess file在谷歌搜索之后,我找到了一些关于我的 .htaccess 文件有什么问题的文档

adding this fixed the issue添加此修复了问题

Options +FollowSymLinks -Indexes
RewriteEngine On

RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM