The brand-new Ubuntu system finally came to an eye, and the basic configuration of the server was complete. Now we have to rewrite the url. I don't know if this is correct. That's what I understand. URLRewrite is implemented through. htaccess! UbuntuServer's Apache does not support htaccess by default. However, you can implement the desired functions with simple settings. The following are common methods. Step 1: Execute sudoa2enmodrewrite to return
The brand-new Ubuntu system finally came to an eye, and the basic configuration of the server was complete. Now it's time to Rewrite the url. I don't know if this is correct. I understand this. URL Rewrite is implemented through. htaccess!
By default, Apache of Ubuntu Server does not support htaccess.
However, you can implement the desired functions with simple settings.
The following are common methods.
Step 1: Execute sudo a2enmod rewrite
Return Value:
Perl: warning: Setting locale failed.
Perl: warning: Please check that your locale settings:
LANGUAGE = "zh_CN: zh ",
LC_ALL = (unset ),
LANG = "zh_CN"
Are supported and installed on your system.
Perl: warning: Falling back to the standard locale ("C ").
Enabling module rewrite.
Run '/etc/init. d/apache2 restart' to activate new configuration!
Step 2: Run/etc/init. d/apache2 restart
Now the server has enabled modrewrite.
Step 3: Set the website to be enabled
<Directory/var/www/>
AllowOverride All (Change none to All)
Order allow, deny
Allow from all
</Directory>
Step 4: upload your. htaccess File
The test takes effect.