Apache under CentOS6.4 enables pseudo-static

Source: Internet
Author: User
I deployed LAMP in my company today and thought about it. I didn't test the pseudo static state of LAMP .... So I found this article online and generated it. I will share with you the LAMP setup steps I have used in the enterprise. ---- What is pseudo-static. to put it bluntly, pseudo-static means that the address does not contain & quot ;? &Quot;.html is usually displayed on the internet. The origin of pseudo-static is relatively real and static. generally, we want to better relieve server pressure and enhance the friendly aspect of search engines.

I deployed LAMP in my company today and thought about it. I didn't test the pseudo static state of LAMP .... So I found this article online and generated it. I will share with you the LAMP setup steps I have used in the enterprise.

---- What is pseudo-static
To put it bluntly, pseudo-static means that the address does not contain "? ", Which is usually displayed in. html on the Internet

---- Origin of pseudo-static
Static page form of category one

---- Benefits and disadvantages of pseudo-static

Benefits: it is conducive to being indexed by search engines, preventing injection and leeching. Compared with static, pseudo-static applications do not damage the hard disk.

Disadvantage: pseudo-static will occupy a certain amount of CPU usage. The reason is that a large number of regular expressions are used in pseudo-static mode. for example, there is a page named "lampPHP. php? Id = 2 "after pseudo-static processing, it can be converted to “lampphp_2.html?#lamp_2.html". This is all possible, so it requires a certain amount of memory to separate it.

---- Implement pseudo-static

Apache configuration:

Enable rewrite

# LoadModule rewrite_module modules/mod_rewrite.so

Remove the previous #

LoadModule rewrite_module modules/mod_rewrite.so

Enable. htaccess (approximately 150 rows-154 rows)

AllowOverride None: AllowOverride All


Here, restart apache, and the pseudo-static state will be O


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.