Apache Open static page
The main unresolved pit of the blogger:
I first built lamp using a compile and install httpd service, when the static page was opened found in Httpd.conf no LoadModule rewrite_module libexec/mod_ rewrite.so code, manually add in to restart the Apache times wrong;
View the file. Htaccess is also normal:
# BEGIN Wordpress<ifmodule mod_rewrite.c>rewriteengine onrewritebase/rewriterule ^index\.php$-[L]RewriteCond% {request_filename}!-frewritecond%{request_filename}!-drewriterule. /index.php [l]</ifmodule>
Compile and install the httpd version with the following parameters:
#wget Https://mirrors.tuna.tsinghua.edu.cn/apache/httpd/httpd-2.2.31.tar.gz#tar XF httpd-2.2.31.tar.gz #cd Httpd-2.2.31#yum install zlib zlib-devel-y./configure--prefix=/application/apache2.2.31--enable-deflate-- Enable-expires--enable-headers--enable-modules=most--enable-so--with-mpm=worker--enable-rewrite#make#make Install
In short, the problem is to solve
In a simple, easy-to-use, efficient principle, I recommend the use of Yum installation;
Apache implements the actual operation of a static page:
In configuration file httpd.conf:
allowoverride None change to allowoverride All
The file should have LoadModule rewrite_module libexec/mod_rewrite.so, if there is a # comment before the code, remove the comment, if not the code is added manually;
. htaccess file:
# BEGIN Wordpress<ifmodule mod_rewrite.c>rewriteengine onrewritebase/rewriterule ^index\.php$-[L]RewriteCond% {request_filename}!-frewritecond%{request_filename}!-drewriterule. /index.php [l]</ifmodule>
The file is manually added to the file without the above code
This article is from "Little New" blog, please be sure to keep this source http://zhanghongxin.blog.51cto.com/11255031/1853409
Apache Static page