所以我有一个非常标准的Apache 2安装, AllowOverride all 。
我在docroot下的“testing”文件夹中有三个文件:
的.htaccess
AddHandler send-as-is .asis
page.html中
this is the page!
wtf.asis
Status: 301 Copy Is Elsewhere Location: /testing/page.html Content-Type: text/plain Redirecting...
当我将浏览器指向/testing/wtf.asis ,我看到文本“这是页面!”,但地址栏仍然显示/testing/wtf.asis 。 我希望在地址栏中看到/testing/page.html ,并获得301redirect! 相反,我得到了200的回应。 这是怎么回事? 它在做内部redirect吗? 如果是这样,为什么?
我不确定,但我怀疑该位置需要一个完整的url。 你可以试试吗?