1

我是一名没有 Drupal 经验的 JavaScript 开发人员。

在他们的开发人员继续前进后,我正在与教堂合作重新设计他们的 Drupal 站点,而没有留下任何笔记/文档/等。同时,我想放置一些静态 html 页面来代替 Drupal 站点,而不需要删除所有的 Drupal 数据。

我可以“关闭” Drupal,以便现在由 Drupal 提供支持的路由(即:)church.org/worship将改为呈现静态文件版本(即:)church.org/worship/index.html吗?

利用 Drupal 的“维护模式”是一种可能的解决方案吗?我在替换默认维护页面时找到了这篇文章https://drupalden.co.uk/static-maintenance-page-replace-drupals-default-maintenance-mode-page,但是其他路线呢?

谢谢你的帮助!

4

1 回答 1

2

当文件或文件夹不在磁盘上时,Drupal 的 htaccess 将请求重定向到 index.php。

这在 7 和 8 上是正确的。

如果您想在/worship/创建文件夹时放置一个静态页面,/worshipindex.html在其中放置一个将被拾取的文件夹。

代码看起来像,

  # Pass all requests not referring directly to files in the filesystem to
  # index.php.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^ index.php [L]

D8 链接,https://git.drupalcode.org/project/drupal/-/blob/8.8.x/.htaccess#L134-139

于 2020-04-13T01:56:20.300 回答