Apache 将Grav CMS部署到Heroku

Apache 将Grav CMS部署到Heroku,apache,.htaccess,heroku,grav,Apache,.htaccess,Heroku,Grav,我正在使用Grav CMS的RTFM框架,并试图通过GitHub将其部署到Heroku。Heroku完成了部署,说没有发生错误,但Heroku只给了我500个错误 有人知道如何让它工作吗?我被指向.htaccess文件,但看不到任何明显的错误(粘贴在下面)。非常感谢 <IfModule mod_rewrite.c> RewriteEngine On ## Begin RewriteBase # If you are getting 404 errors on subpages,

我正在使用Grav CMS的RTFM框架,并试图通过GitHub将其部署到Heroku。Heroku完成了部署,说没有发生错误,但Heroku只给了我500个错误

有人知道如何让它工作吗?我被指向.htaccess文件,但看不到任何明显的错误(粘贴在下面)。非常感谢

<IfModule mod_rewrite.c>

RewriteEngine On

## Begin RewriteBase
# If you are getting 404 errors on subpages, you may have to uncomment the RewriteBase entry
# You should change the '/' to your appropriate subfolder. For example if you have
# your Grav install at the root of your site '/' should work, else it might be something
# along the lines of: RewriteBase /<your_sub_folder>
##

# RewriteBase /

## End - RewriteBase

## Begin - Exploits
# If you experience problems on your site block out the operations listed below
# This attempts to block the most common type of exploit `attempts` to Grav
#
# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
## End - Exploits

## Begin - Index
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
## End - Index

## Begin - Security
# Block all direct access for these folders
RewriteRule ^(.git|cache|bin|logs|backup)/(.*) error [L]
# Block access to specific file types for these folders
RewriteRule ^(system|user|vendor)/(.*)\.(txt|md|html|yaml|php|twig|sh|bat)$ error [L]
# Block all direct access to .md files:
RewriteRule \.md$ error [L]
# Block all direct access to files and folders beginning with a dot
RewriteRule (^\.|/\.) - [F]
# Block access to specific files in the root folder
RewriteRule ^(LICENSE|composer.lock|composer.json|nginx.conf|web.config)$ error [F]
## End - Security

</IfModule>

# Begin - Prevent Browsing and Set Default Resources
Options -Indexes
DirectoryIndex index.php index.html index.htm
# End - Prevent Browsing and Set Default Resources

重新启动发动机
##开始重写基地
#如果子页面上出现404个错误,则可能必须取消对RewriteBase条目的注释
#您应该将“/”更改为相应的子文件夹。例如,如果你有
#在站点“/”的根目录下安装Grav应该可以工作,否则可能会有问题
#沿着:重写基础/
##
#重写基/
##端基
##开始-利用
#如果您的网站出现问题,请排除下面列出的操作
#这将试图阻止最常见的利用“企图”进行欺诈的行为
#
#阻止任何试图在URL中对数据进行base64_编码的脚本。
RewriteCond%{QUERY\u STRING}base64\u encode[^(]*\([^)]*\)[或]
#阻止在URL中包含标记的任何脚本。
重写cond%{QUERY_STRING}(|%3E)[NC,或]
#阻止任何试图通过URL设置PHP全局变量的脚本。
重写条件%{QUERY\u STRING}全局(|\[|\%[0-9A-Z]{0,2})[或]
#阻止任何试图通过URL修改_请求变量的脚本。
重写条件%{QUERY\u STRING}\u请求(|\[|\%[0-9A-Z]{0,2})
#返回403禁止标题并显示根主页的内容
重写规则。*index.php[F]
#
##终端开发
##开始索引
#如果请求的路径和文件不是/index.php,则
#尚未在内部重写为index.php脚本
重写cond%{REQUEST_URI}!^/index\.php
#请求的路径和文件与物理文件不直接匹配
重写cond%{REQUEST_FILENAME}!-f
#请求的路径和文件与物理文件夹不直接匹配
重写cond%{REQUEST_FILENAME}!-d
#在内部将请求重写为index.php脚本
重写规则。*index.php[L]
##末端索引
##开始-安全
#阻止对这些文件夹的所有直接访问
重写规则^(.git | cache | bin | logs | backup)/(*)错误[L]
#阻止访问这些文件夹的特定文件类型
重写规则^(系统|用户|供应商)/(.*)\(txt | md | html | yaml | php |细枝| sh | bat)$错误[L]
#阻止对.md文件的所有直接访问:
重写规则\.md$错误[L]
#阻止对以点开头的文件和文件夹的所有直接访问
重写规则(^\.|/\)-[F]
#阻止对根文件夹中特定文件的访问
重写规则^(LICENSE | composer.lock | composer.json | nginx.conf | web.config)$error[F]
##终端安全
#开始-禁止浏览并设置默认资源
选项-索引
DirectoryIndex.php index.html index.htm
#结束-阻止浏览并设置默认资源

好的,所以修复程序根本不是.htaccess文件,我需要在我的composer.json的require部分包含以下内容,并更新composer.lock

“ext mbstring”:“*”