How to enable Apache Rewrite in Ubuntu

Source: Internet
Author: User
I recently used Ubuntu to test my website server. The reason is that the visual operations of ubuntu are very practical for linux cainiao like me. Recently installed LAMP for debugging, and found that the. htaccess file is not supported, that is, pseudo static. So I learned how to enable this function only after repeated online query debugging. Sudoa2enmodrewrite enable Rewrite module sudo/etc/init. d/apache2restartsudogedi

I recently used Ubuntu to test my website server. The reason is that the visual operations of ubuntu are very practical for linux cainiao like me. Recently installed LAMP for debugging, and found that the. htaccess file is not supported, that is, pseudo static. So I learned how to enable this function only after repeated online query debugging.

Sudo a2enmod rewrite enable Rewrite module sudo/etc/init. d/apache2 restart

Sudo gedit/etc/apache2/sites-available/default modify the following


Options FollowSymLinks
AllowOverride None (change to AllowOverride All)


Options Indexes FollowSymLinks MultiViews
AllowOverride None (change to AllowOverride All)
Order allow, deny
Allow from all

In fact, the solution posted elsewhere on the Internet is to change the Options FollowSymlinks. Actually, no. www.linuxidc.com needs to modify Options Indexes FollowSymLinks MultiViews.

Sudo/etc/init. d/apache2 restart. Create the. htaccess file touch. htaccess under the website.
Modify the attributes of the. htaccess file chmod-R 777. htaccess

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.