CentOS Open Apache pseudo static

Source: Internet
Author: User

1. Turn on the rewrite module

Vim Httpd.conf#[plain] View plain copyloadmodule rewrite_module modules/mod_rewrite.so


2. Turn on allowoverride

[Plain] View plain copy# # AllowOverride controls What directives is placed in. htaccess files. # It can be ' all ', ' None ', or any combination of the keywords: # Options FileInfo authconfig Limit # allowoverride No NE modify allowoverride None for allowoverride all

About allowoverride Instructions:

The allowoverride parameter indicates whether the Apache server is looking for a. htaccess file as a configuration file, and if set to none, the server ignores the. htacess file, if set to all, Then all the instructions in the. htaccess file will be rewritten. For allowoverride, it is also possible to specify the following types of instructions that can be overridden. The rewrite rule is usually written in the. htaccess file when the URL is rewritten using the Apache rewrite module. However, to enable Apache to read the contents of the. htaccess file properly, you must configure the directory where the. htaccess is located. From security considerations, the AllowOverride property of the root directory is generally configured to disallow any override, i.e. the code is as follows: <directory/> allowoverride None </Directory> in When AllowOverride is set to None, the. htaccess file is completely ignored. When this directive is set to all, any directives with the ". htaccess" Scope are allowed to appear in the. htaccess file. For URL rewrite, at a minimum, you need to set the directory to code as follows: < directory/myblogroot/> allowoverride FileInfo </directory>


3. Allow Apache support. htaccess

[Plain] View plain copyoptions followsymlinks allowoverride None modified to [plain] view plain copyoptions followsymlinks Allo Woverride All


4. Restart the process

Systemctl Restart Httpd.service


This article is from the "take a deep Breath again" blog, make sure to keep this source http://ckl893.blog.51cto.com/8827818/1928134

CentOS Open Apache pseudo static

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.