【发布时间】:2013-03-19 14:06:02
【问题描述】:
我的 webservers /marssolover/protected 文件夹中有一个 .htaccess 文件,它允许我从受保护的文件夹中获取文件并通过位于同一文件夹中的 filestreamer.php 文件对其进行流式传输。 mod_rewrite 在 localhost 上工作正常,但在 1&1 上不行。
我已经用 .htaccess 文件搜索并尝试了一些建议:
AddHandler x-mapp-php6 .php
RewriteEngine On
Options -MultiViews
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteBase /MARS/MARSSecure
RewriteRule ^(.*)$ filestreamer.php?file=$1 [L]
<Files .htaccess>
order allow,deny
deny from all
</Files>
但是,它仍然无法正常工作。我读过它可能与 MultiViews 有关,但我认为 Options -MultiViews
【问题讨论】:
-
您是否检查过 1&1 是否在您的主机上启用了 mod_rewrite?
-
@atallon 他们确实支持它,他们的回答是“请注意我们的托管包支持该应用程序。”
标签: php .htaccess mod-rewrite apache2