After opening the httpd.conf file with a text editor open, look for
The code is as follows |
Copy Code |
Options FollowSymLinks AllowOverride None Switch Options FollowSymLinks AllowOverride All |
But I didn't find anything like options followsymlinks in my httpd.conf file. I had to
The code is as follows |
Copy Code |
Options FollowSymLinks AllowOverride All |
Manually add it to the httpd.conf file and restart the Apache server, and the problem is resolved.
If you also encounter Apache is not supported. htaccess situation, use the above situation I do not, then in the httpd.conf file search LoadModule rewrite_module modules/mod_ Rewrite.so, if there is a # symbol in front, remove it. Save, and then restart Apache.
Another article describes
Locate the Apache httpd.conf configuration file and the editor opens.
The code is as follows |
Copy Code |
Found it <directory/> Options FollowSymLinks AllowOverride None </Directory> Revision changed to <directory/> Options FollowSymLinks AllowOverride All </Directory> You can do it. |
/*
If you need to use a file name other than. htaccess, you can use the Accessfilename directive to change it.
For example, if you need to use. config, you can configure it in the server configuration file in the following ways:
*/
Accessfilename. config
There are two main reasons for avoiding the use of. htaccess files.
The first is performance. If the. htaccess file is enabled for allowoverride, Apache needs to find the. htaccess file in each directory, so whether or not it is actually used, enabling. Htaccess can result in degraded performance. In addition, for each request, you need to read the. htaccess file once.
Also, Apache must look up the. htaccess file in all superior directories to make all valid directives work, so if you request a page in/ctusky/ctu/sky, Apache must look for the following files:
The code is as follows |
Copy Code |
/.htaccess /ctusky/.htaccess /ctusky/ctu/.htaccess /ctusky/ctu/sky/.htaccess |
There will be a total of 4 additional files to access, even if none of these files exist, which is why this article began to say that it would affect the performance of the server.
Apache support. htaccess Configuration method