【问题标题】:permission to access /framework/main.php访问 /framework/main.php 的权限
【发布时间】:2016-02-23 14:19:43
【问题描述】:

我正在使用 silver strip 以及一些我的 htaccess 文件是如何从 FTP 中删除的,然后我找到了 silver strip 的 htaccess,现在我的 htacess 是。

### 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 /

    RewriteCond %{REQUEST_URI} ^(.*)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .* framework/main.php?url=%1&%{QUERY_STRING} [QSA]

</IfModule>

### SILVERSTRIPE END ###

但我仍然遇到同样的问题 403 被禁止。

有人知道我的 htaccess 有什么用吗? 如果我错过了任何解释,请告诉我。 非常感谢

【问题讨论】:

  • 当你得到 403 时你试图访问的 URL 是什么?请提供有关您的 &lt;Directory /&gt; 指令的信息,如果您的 .htaccess 中只有这些信息,那么请提供来自 httpd.conf 的信息 ..您可能想要放置所有内容,其中没有秘密 ..另外,请提供错误日志..

标签: apache .htaccess mod-rewrite silverstripe


【解决方案1】:

确保在您的 httpd.conf 文件中设置了 AllowOverride All

【讨论】:

    猜你喜欢
    • 2015-04-21
    • 1970-01-01
    • 1970-01-01
    • 2023-03-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-01-25
    • 1970-01-01
    相关资源
    最近更新 更多