Drupal Internal Server Error 500

本文介绍了解决Drupal网站部署后出现InternalServerError500错误的方法,通过修改.htaccess文件实现301重定向,并提供了具体的.htaccess配置示例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

我在本地测试网站完毕后,上传到空间,出现Internal Server Error 500,这样我只有关闭clean url,然后.htaccess才能起作用,才能实现301的跳转。可当我开启clean url,如果你使用的是drupal 默认的.htaccess,那么就找不到页面。下面我简单地重写了下.htaccess,因为我只需要它实现301跳转。

原文出自:http://suyou.info/node/32

  1. <IfModule mod_rewrite.c>
  2. RewriteEngine on
  3. RewriteBase /
  4. RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC]
  5. RewriteRule ^ http://%1%{REQUEST_URI} [L,R=301]
  6. RewriteCond %{REQUEST_FILENAME} !-f
  7. RewriteCond %{REQUEST_FILENAME} !-d
  8. RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
  9. </IfModule>
Debian系统非Docker安装nextcloud,访问时提示:500 Internal Server Error nginx/1.18.0。nginx/error.log内容如下: 2025/06/09 11:45:17 [error] 32990#32990: *3 rewrite or internal redirection cycle while internally redirecting to "/index.php/index.php/csrftoken", client: 192.168.60.200, server: , request: "GET /index.php/csrftoken HTTP/1.1", host: "192.168.60.200" 2025/06/09 12:00:17 [error] 32990#32990: *4 rewrite or internal redirection cycle while internally redirecting to "/index.php/index.php/csrftoken", client: 192.168.60.200, server: , request: "GET /index.php/csrftoken HTTP/1.1", host: "192.168.60.200" 2025/06/09 12:15:20 [error] 32990#32990: *5 rewrite or internal redirection cycle while internally redirecting to "/index.php/index.php/csrftoken", client: 192.168.60.200, server: , request: "GET /index.php/csrftoken HTTP/1.1", host: "192.168.60.200" 2025/06/09 12:30:20 [error] 32990#32990: *6 rewrite or internal redirection cycle while internally redirecting to "/index.php/index.php/csrftoken", client: 192.168.60.200, server: , request: "GET /index.php/csrftoken HTTP/1.1", host: "192.168.60.200" 2025/06/09 12:42:02 [error] 32990#32990: *11 rewrite or internal redirection cycle while internally redirecting to "/index.php/index.php/core/apps/recommended", client: 192.168.60.200, server: , request: "GET /index.php/core/apps/recommended HTTP/1.1", host: "192.168.60.200" 2025/06/09 12:43:10 [error] 32990#32990: *13 rewrite or internal redirection cycle while internally redirecting to "/index.php/index.php/apps/dashboard/", client: 192.168.60.200, server: , request: "GET /index.php/apps/dashboard/ HTTP/1.1", host: "192.168.60.200" 2025/06/09 12:43:23 [error] 32990#32990: *15 rewrite or internal redirection cycle while internally redirecting to "/index.php/index.php/apps/dashboard/", client: 192.168.60.200, server: , request: "GET /index.php/apps/dashboard/ HTTP/1.1", host: "192.168.60.200" 2025/06/09 13:12:22 [error] 38605#38605: *1 rewrite or internal redirection cycle while internally redirecting to "/index.php/index.php/apps/dashboard/", client: 192.168.60.200, server: , request: "GET /index.php/apps/dashboard/ HTTP/1.1", host: "192.168.60.200" 2025/06/09 13:36:09 [error] 38605#38605: *3 rewrite or internal redirection cycle while internally redirecting to "/index.php/index.php/apps/dashboard/", client: 192.168.60.200, server: , request: "GET /index.php/apps/dashboard/ HTTP/1.1", host: "192.168.60.200" 2025/06/09 13:36:16 [error] 38605#38605: *4 rewrite or internal redirection cycle while internally redirecting to "/index.php/index.php/apps/dashboard/", client: 192.168.60.200, server: , request: "GET /index.php/apps/dashboard/ HTTP/1.1", host: "192.168.60.200" 2025/06/09 13:53:56 [error] 38605#38605: *7 rewrite or internal redirection cycle while internally redirecting to "/index.php/index.php/apps/dashboard/", client: 192.168.60.200, server: , request: "GET /index.php/apps/dashboard/ HTTP/1.1", host: "192.168.60.200" 2025/06/09 13:53:56 [error] 38605#38605: *9 open() "/var/www/nextcloud/favicon.ico" failed (2: No such file or directory), client: 192.168.60.200, server: , request: "GET /favicon.ico HTTP/1.1", host: "192.168.60.200", referrer: "http://192.168.60.200/index.php/apps/dashboard/"怎么解决问题?
最新发布
06-10
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值