Using tuserver to set urlrewritemod to support. htaccess

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.