【问题标题】:htaccess don't work on cpanel but worked fine on wampserverhtaccess 在 cpanel 上不起作用,但在 wampserver 上运行良好
【发布时间】:2014-11-17 01:05:27
【问题描述】:

当我尝试在使用 cpanel 的服务器上发布我的网站时遇到错误,该网站运行良好,在 wampserver 中运行良好,我认为问题可能来自为我生成 500 错误的 htaccess 文件

这是我的 htaccess

php_flag display_errors on
php_value error_reporting 9999

RewriteEngine On
RewriteBase /  (because my files are in public_html)

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]

这是我第一次使用stackoverflow,请帮助我

【问题讨论】:

    标签: .htaccess rewrite localhost cpanel wampserver


    【解决方案1】:

    如果有人经过这里,只需从 yout .htaccess 中删除 php_flag 和 php_value,因为某些托管公司不允许用户使用它们,比如我的情况

    【讨论】:

      猜你喜欢
      • 2019-05-04
      • 2022-01-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-10
      • 2018-03-17
      • 1970-01-01
      相关资源
      最近更新 更多