duanliaoyu8419 2018-03-10 12:43
浏览 95

Apache在MacOS上永远忽略了htaccess

I am trying to set up a PHP project locally on my Mac but I can't for the life of me get Apache to stop ignoring the .htaccess file.

I have edited the apache2/httpd.conf file to enable mod_rewrite.so and set Override All instead of Override None here, as instructed by the internet:

<Directory "/Library/WebServer/Documents">
#
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All 
</Directory>

Supposedly after restarting Apache this should get it to work 100% of the time, but no.

I placed the site files in Desktop/projectname - do I need to place it somewhere else? This is procedural PHP. I have some Laravel projects placed in the Desktop directory and they all worked out of the box with no need to meddle with system configuration files.

PHP version is 7.2 if that matters, which it shouldn't.

I have spent 3 hours bashing my head with this.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
    • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
    • ¥15 cmd cl 0x000007b
    • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
    • ¥500 火焰左右视图、视差(基于双目相机)
    • ¥100 set_link_state
    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化
    • ¥15 Tableau online 嵌入ppt失败
    • ¥100 支付宝网页转账系统不识别账号