【问题标题】:HTACCESS works local not on serverHTACCESS 在本地而不是在服务器上工作
【发布时间】:2020-08-14 03:46:36
【问题描述】:

我的代码在 localhost 中运行良好,但是当我将其上传到域时出现错误 500,有时出现空白页 请有任何建议! 我的 htaccess:

enter code here

重写引擎开启

RewriteCond $1 !^(index.php|images|robots.txt)

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

重写规则 ^(.*)$ index.php/$1 [L]

【问题讨论】:

  • 检查错误日志的内容 - 当您遇到 500 内部服务器错误时,这始终是您要做的第一件事。

标签: php .htaccess web server localhost


【解决方案1】:

确保在您的 apache 配置中启用了 RewriteEngine 我认为此链接将有助于解决您的问题https://hostadvice.com/how-to/how-to-enable-apache-mod_rewrite-on-an-ubuntu-18-04-vps-or-dedicated-server/

【讨论】:

猜你喜欢
  • 2011-09-18
  • 1970-01-01
  • 2013-07-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-10-12
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多