.htaccess - 如何让 MAMP 读取 .htaccess 文件

标签 .htaccess mamp

我正在尝试让 .htaccess 在 MAMP 中工作。 .htaccess 的内容是一个简单的重定向行,但整个 .htaccess 文件似乎没有任何效果,即使我将其更改为包含无效数据也是如此。

我需要更改 MAMP 中的任何设置才能启用 .htaccess 文件吗?

最佳答案

  1. /Applications/MAMP/conf/apache 上的 httpd.conf 中,查找:

    <Directory />
        Options Indexes FollowSymLinks
        AllowOverride None
    </Directory>
    
  2. 替换为全部

  3. 重新启动 MAMP 服务器。

关于.htaccess - 如何让 MAMP 读取 .htaccess 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7670561/

相关文章:

php - .htaccess - 将允许的 URL 列入白名单

MAMP : dyld: Symbol not found: __cg_jpeg_resync_to_restart Referenced from:/System/Library

apache - .htaccess 在文件不存在时重定向

php - URI 路由不起作用(多语言)

PHP 将 url 传递给 index.php

svn - 两个程序员在处理相同的代码

php - session 不适用于 MAMP

mysql - 优胜美地MAMP遗憾

mysql - 无法在 MAMP 3.5.2 上启动 mySql

.htaccess - 如何从http请求中删除多余的字符?