Apache opens rewrite to achieve pseudo-static

The method to enable rewrite is very simple, open the conf/httpd.conf file in the Apache installation directory:

remove:

 
 
  1. #LoadModule rewrite_module modules/mod_rewrite.so

The preceding hashtag note:

 
 
  1. LoadModulerewrite_module modules/mod_rewrite.so

Then put:

 
 
  1. AllowOverridenone

Replace all with:

 
 
  1. AllowOverrideall

That's it.

To achieve pseudo-static, you need to add .htaccess to the directory of the website that needs to be pseudo-static. The .htaccess file (or "distributed configuration file") provides a method for changing the configuration for the directory, that is, placing a file in a specific document directory A file containing one or more directives to act on this directory and all its subdirectories. As a user, the commands you can use are limited.

There are very handy generators online: http://www.wangqu.org/htaccess/ .




========================Signature file========================
Original address (my blog):http://www.clanfei.com/2013/01/1688.htmlWelcome
to visit and exchange. As for why I want to have one more blog, because I love front-end and web pages, I hope to have a more free and truly my own Maybe not so famous, but at least it can make me work harder for it. .
========================Signature file========================





Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324029850&siteId=291194637