1. First check whether Apache rewrite is enabled to create a phpinfo php document & lt ;? Phpphpinfo ();? & Gt; save it as the info. php file in the www directory and open it in a browser. Find apache2handler and check whether mod_rewrite exists in loadModules. If yes, it indicates that it has been enabled. If no sudoa2enmodrewrite is entered in the command line
1. Check whether Apache rewrite is enabled and create a phpinfo php document.
Phpinfo ();
?>
Save as info. php file in www directory and open it in the browser. Find apache2handler and check whether mod_rewrite is enabled in loadModules. If not, enter
Sudo a2enmod rewrite
Restart the apache service: sudo apache2 restart
Refresh the info page and you will be able to see it.
2. modify the configuration file of apache2. The new version of Apache2 does not have httpd. conf, And it is Apache2.conf.
Sudo vi/etc/apache2/apache2.conf
Edit AllowOverride none
Change to AllowOverrid All.
A total of two changes
3. Restart Apache2 and check the effect.
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2
This article permanently updates the link address: Http://www.linuxidc.com/Linux/2016-01/127181.htm