Configuration method that Windows Apache uses. htaccess URL overrides

Source: Internet
Author: User
Tags web hosting

Step one: Find Apache configuration file httpd.conf (files in the Conf directory)

Second step: You must first have to let the server support Mod_rewrite, if you are using a virtual host, please ask your host provider in advance.

Open httpd.conf and find

#LoadModule Rewrite_module modules/mod_rewrite.so

Get rid of the #

Find allowoverride None, change to allowoverride all,

Note: The allowoverride parameter is set to all, which means that URL rule overrides are supported on the entire server. The Apache server reads the. htaccess file under the directory under each Web site. Without this file, or if the document does not define any rules about URL rewriting, there is no effect.

For different URLs, you need to add the following in Apache

<directory "E:/apache Group/apache2/htdocs/leapsoul" >

/* Quotation marks represent your web hosting directory * *

* If it is Linux, as long as you locate your site directory can be * *

Options FollowSymLinks

AllowOverride None

</Directory>

Step three: Restart the Apache server, press stop and start first.

Fourth step: In you need URL rewrite the site directory to devolve a. htaccess file, the filename is. HTACCESS,WINDIWS cannot be directly established, you can save it as a notepad.

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.