In Windows, we generally use the Administrator account, so enabling these two items is very simple:
1. Find # LoadModule rewrite_module modules/mod_rewrite.so in the [Apache installation directory]/conf/httpd. conf and remove the annotator #. If this row does not exist, add it. Check whether the mod_rewrite.so file exists in the modules folder under the apache installation directory. In this way, the Mod Rewrite function is enabled.
2. In the [Apache installation directory]/conf/httpd. conf, find
The code is as follows: |
Copy code |
<Directory/> Options FollowSymLinks AllowOverride None Order deny, allow Deny from all </Directory> |
Change "AllowOverride None" to "AllowOverride All", so that All folders are supported. htaccess or enabled for the specified folder. htaccess, which can be found in the [Apache installation directory]/conf/httpd. add in conf
The code is as follows: |
Copy code |
<Directory "D:/sites/example/"> Options Indexes FollowSymLinks AllowOverride All Order allow, deny Allow from all </Directory> |
This approach is generally configured with the virtual host, so most will write the above configuration code into the [Apache installation directory]/conf/extra/httpd-vhost.conf, which is clear and easy to manage.
3. After restarting Apache, it will be OK.