简体   繁体   English

PHP-Silverstripe-htaccess抛出500

[英]PHP - Silverstripe - htaccess throwing a 500

I'm jumping into a PHP SilverStripe installation and my local environment handles my .htaccess file fine but my test server is throwing a 500 error on the following. 我正在进入PHP SilverStripe安装,并且我的本地环境可以很好地处理.htaccess文件,但是我的测试服务器在下面抛出500错误。 I have no idea what it could be (as I normally roll with ASP.NET). 我不知道它是什么(因为我通常使用ASP.NET滚动)。 Could you guys help point to me what the potential issues are here? 你们能帮我指出潜在的问题吗?

### SILVERSTRIPE START ###
<Files *.ss>
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
</Files>

<Files web.config>
    Order deny,allow
    Deny from all
</Files>

ErrorDocument 404 /assets/error-404.html
ErrorDocument 500 /assets/error-500.html

<IfModule mod_alias.c>
    RedirectMatch 403 /silverstripe-cache(/|$)
</IfModule>

<IfModule mod_rewrite.c>
    SetEnv HTTP_MOD_REWRITE On
    RewriteEngine On
    RewriteBase /thesitename

    RewriteCond %{REQUEST_URI} ^(.*)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
</IfModule>
### SILVERSTRIPE END ###

尝试注释掉重写基准行,或者如果测试服务器安装位于子目录中,则将其更改为该子目录;)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM