First, edit the httpd.conf file
A-In the etc/httpd/conf/directory of the httpd.conf file, find:
LoadModule Rewrite_module modules/mod_rewrite.so
If there is a # before the cancellation, if not on the default do not modify.
B-Set AllowOverride
Again, find the following script in the httpd.conf
<directory/>
Options FollowSymLinks
AllowOverride None
</Directory>
Change None to All
Example
The code is as follows |
Copy Code |
Options FollowSymLinks AllowOverride None To Options FollowSymLinks AllowOverride All |
Second, restart the Apache environment
Service httpd Restart
In this way, we have a. htaccess file in the root directory of the Web site, and pseudo static is in effect.
Example
Believe that 301 jump everyone knows that this is conducive to weight concentration, in the. htaccess file Written:
The code is as follows |
Copy Code |
Rewriteengine on Rewritecond%{http_host} ^111CN.NET[NC] Rewriterule ^ (. *) $ http://www.111cn.net/$1 [l,r=301] |
That's it, okay?