Use .htaccess file on an apache localhost server

前端 未结 4 1780
南旧
南旧 2020-12-28 21:16

Alright, I got an Apache localhost server up and running with PHP and MySql. Now I want to be able to use a .htaccess file as well to use RewriteRule

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-28 21:33

    Enable .htaccess on apache servers in localhost

    1) Find your apache directly which uses the php installation .
    2) Open your httpd.conf  with notepad, Which is located in the path \apache\conf directory
    3) Find the code like below       
          #LoadModule rewrite_module modules/mod_rewrite.so
    4) Remove # from above code
    
    
    # AllowOverride controls what directives may be placed in .htaccess files.
     # It can be "All", "None", or any combination of the keywords:
     #   Options FileInfo AuthConfig Limit
     #
     AllowOverride All   <--- make sure this is not set to "None"
    
    
    5) Save httpd.conf file
    6) Restart your apache server
    

提交回复
热议问题