- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
通过 Bitbucket 存储库将基于 Grav CMS ( http://getgrav.org ) 的网站部署到 Azure 后,我收到消息“您无权查看此目录或页面”。当我尝试浏览该网站时。我尚未更改任何配置设置。
最佳答案
由于在 Azure 上运行的 PHP 应用程序托管在 IIS 上,因此出现您的问题是由于您尚未在 IIS 中配置 URL 重写模式。
尝试在应用程序的根目录中创建一个名为 web.config
的文件,其中包含以下内容:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<defaultDocument>
<files>
<remove value="index.php" />
<add value="index.php" />
</files>
</defaultDocument>
<rewrite>
<rules>
<rule name="request_filename" stopProcessing="true">
<match url="." ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
<rule name="user_accounts" stopProcessing="true">
<match url="^user/accounts/(.*)$" ignoreCase="false" />
<action type="Redirect" url="error" redirectType="Permanent" />
</rule>
<rule name="user_config" stopProcessing="true">
<match url="^user/config/(.*)$" ignoreCase="false" />
<action type="Redirect" url="error" redirectType="Permanent" />
</rule>
<rule name="user_error_redirect" stopProcessing="true">
<match url="^user/(.*)\.(txt|md|html|php|yaml|json|twig|sh|bat)$" ignoreCase="false" />
<action type="Redirect" url="error" redirectType="Permanent" />
</rule>
<rule name="cache" stopProcessing="true">
<match url="^cache/(.*)" ignoreCase="false" />
<action type="Redirect" url="error" redirectType="Permanent" />
</rule>
<rule name="bin" stopProcessing="true">
<match url="^bin/(.*)$" ignoreCase="false" />
<action type="Redirect" url="error" redirectType="Permanent" />
</rule>
<rule name="backup" stopProcessing="true">
<match url="^backup/(.*)" ignoreCase="false" />
<action type="Redirect" url="error" redirectType="Permanent" />
</rule>
<rule name="system" stopProcessing="true">
<match url="^system/(.*)\.(txt|md|html|yaml|php|twig|sh|bat)$" ignoreCase="false" />
<action type="Redirect" url="error" redirectType="Permanent" />
</rule>
<rule name="vendor" stopProcessing="true">
<match url="^vendor/(.*)\.(txt|md|html|yaml|php|twig|sh|bat)$" ignoreCase="false" />
<action type="Redirect" url="error" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
</system.webServer>
<system.web>
<httpRuntime requestPathInvalidCharacters="<,>,*,%,&,\,?" />
</system.web>
</configuration>
然后将其与您的应用程序一起部署到 Azure。此外,您还可以在 grav 应用程序的 webserver-configs
文件夹中找到此配置文件。或者您可以引用https://github.com/Vivalldi/grav/blob/develop/webserver-configs/web.config在 github 上。
如有任何进一步的疑问,请随时告诉我。
关于php - 将 Grav CMS 部署到 Azure,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38176583/
我是 Grav 的新手,我正在努力学习基础知识。如果我想要以下页面结构: root |_______ set1 | |___ page_10 | |___ pa
我尝试用 GRAV 创建我的第一个网站内容管理系统。现在在我的 pages-folder 中它看起来像这样: home/default.md 关于 关于/seite1/default.md 关于/se
我是第一次使用 Grav,所以 Twig Sytnax 等对我来说还是很新的。 我应该设置导航样式,以便首先显示单词或页面名称的一部分 随着悬停,单词的其余部分应该出现。 (示例:您可以看到“Ab”,
如何在 Grav CMS 中剧透(隐藏文本或 block ) Markdown 或插件?官方不剧透markdown和 Markdown Extra (由 Grav 支持)。 我尝试像 this 这样的
通过 Bitbucket 存储库将基于 Grav CMS ( http://getgrav.org ) 的网站部署到 Azure 后,我收到消息“您无权查看此目录或页面”。当我尝试浏览该网站时。我尚未
我在 Grav CMS 中添加自定义字体时遇到问题。所有字体都添加到文件夹路径下:user/themes/bildxwerkstatt/fonts 当我在 .css 文件中添加此代码时,它可以在我的计
我已经通过 composer 安装了 Grav ( https://getgrav.org/ )。我已经创建了自己的主题,所以我可以从头开始。但现在我想使用媒体查询(断点)、 flex 网格、rem-
我正在使用 Grav 表单 v2.16.4 - 我想将 recaptcha v3 集成到它,但它不起作用。 我在文档中添加了以下字段,如果有任何问题,请告诉我? recaptcha: name:
我创建了一个 Azure 应用服务网站并上传了 Grav内容管理系统。虽然应用程序运行正常,但 GitHub 同步不起作用。 当尝试使用 git 同步插件时,我收到一条错误消息“GitSync 插件需
我刚开始学习 Grav CMS,想在我创建的网站上使用 FontAwesome Pro,我有许可证和所有必要的文件。 我已经将 fontawesome-all.min.css 添加到/user/plu
我已经将 Bootstrap Grav 主题安装到我网站的网络服务器上,但是标准的 css 不会加载 - 有什么想法吗?它在本地工作但是当我重新安装所有东西时我仍然有这个问题 https://gith
我是 Grav CMS 的新手。我在一个模块化页面中创建 2 个表格(联系表格和申请/注册表)时遇到问题。可能吗? 最佳答案 您现在可以使用 Form 2.0 插件做到这一点! 这真的很简单,例如,如
我是 Grav CMS 的新手。我在一个模块化页面中创建 2 个表格(联系表格和申请/注册表)时遇到问题。可能吗? 最佳答案 您现在可以使用 Form 2.0 插件做到这一点! 这真的很简单,例如,如
我们如何更改包含的表单插件生成的表单页面的外观 (CSS)? 我为网站的其余部分包含了我自己的 CSS,但我的 Markdown contact.md 页面看起来很糟糕,而且我使用的是 Materia
我是一名优秀的程序员,十分优秀!