Apache Rewrite returns 子域中什么都没有

Apache Rewrite returns nothing at all in subdomain

我已经在 OVH 上部署了我的网站,但遇到了一些问题。它在本地主机上工作得很好,在 OVH 上 return 什么都没有。两者具有相同的文件结构:

/
  www/
    portfolio/
      [others files or folder]
      .htaccess 
      index.php

问题是我使用的是 Apache 的 rewrite_mod。我的 .htaccess 文件中有这个:

 Options -MultiViews
 RewriteEngine On 
 RewriteCond %{REQUEST_FILENAME} !-f 
 RewriteRule ^ index.php [QSA,L]

所以一切都通过 index.php 但我在 return 中什么也没有。即使我在第一行做了一个简单的 echo 'Hello World !' 。现在我只是尝试通过 www.domain.com/portfolio 访问它,我没有在 www/.htaccess 文件中使用 DirectoryIndex

你有什么想法吗?谢谢

确保在您的 Apache 配置中允许 .htaccess。将 AllowOverride None 更改为 AllowOverride All