Because before the other people on the server loaded with Nginx, I installed Apache, access to the requested URL * * * is not found on this server, view the next/etc/httpd/conf/httpd.conf, Discover the reason:
DocumentRoot point to error, so modify it, and make sure that your Apache is open rewrite_module module
Apache Rewrite_module module, support. htaccess
Rewrite_module is not open, the opening process is as follows:
The CentOS configuration file is placed in:
The code is as follows |
Copy Code |
/etc/httpd/conf/httpd.conf |
Open File Find:
The code is as follows |
Copy Code |
LoadModule Rewrite_module modules/mod_rewrite.so |
Remove the front "#" and add the previous sentence if it does not exist.
If your site is a root directory: find
The code is as follows |
Copy Code |
<directory/> Options FollowSymLinks AllowOverride None </Directory> |
Change the above none to all
If your site is not in the root directory, set the following:
The code is as follows |
Copy Code |
<directory "/var/www/html/my_directory" > Order Allow,deny Allow from all AllowOverride All </Directory> |
OK, then reboot the server, service httpd restart, so. htaccess can use it.