How to configure Apache to support. htaccess files

Source: Internet
Author: User

. Htaccess is a configuration file on the apache server, but it is in the default state. htaccess is not supported. We need to make some simple configuration before it can be used in the apache server. htaccess file.

Open the httpd. conf file and use a text editor to find

The Code is as follows: Copy code

Options FollowSymLinks

AllowOverride None


Changed:


Options FollowSymLinks

AllowOverride All


Search in the httpd. conf file

LoadModule rewrite_module modules/mod_rewrite.so. If there is a # symbol in front of it, remove it. Save and restart Apache.

If you create. htaccess in a windows system, you cannot create it directly. Here is a solution.

Start-run-type cmd to open the cmd window

In this case, the cmd window path is C: Documents and Settingsusername>

Enter the following (excluding the information in parentheses ):

Copy con. htaccess (Press ENTER)

(Press Ctrl + Z to press Enter)

The screen prompt is as follows:

C: Documents and Settingsadmin> copy con. htaccess

^ Z

1 file has been copied.

Return to the desktop and double-click my computer to enter C: Documents and Settingsusername

You can see the file ". htaccess" you want"

Related Article

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.