为什么Apache2.2开启了伪静态会无效呢?

#1 星云无限

  apache 日志
[Thu Sep 03 21:14:41 2015] [notice] Apache/2.2.22 (Win32) PHP/5.3.13 configured -- resuming normal operations
[Thu Sep 03 21:14:41 2015] [notice] Server built: Jan 28 2012 11:16:39
[Thu Sep 03 21:14:41 2015] [notice] Parent: Created child process 3612
[Thu Sep 03 21:14:41 2015] [notice] Child 3612: Child process is running
[Thu Sep 03 21:14:41 2015] [notice] Child 3612: Acquired the start mutex.
[Thu Sep 03 21:14:41 2015] [notice] Child 3612: Starting 64 worker threads.
[Thu Sep 03 21:14:41 2015] [notice] Child 3612: Starting thread to listen on port 80.
[Thu Sep 03 21:20:12 2015] [error] [client 192.168.1.226] script 'C:/amp/Apache/htdocs/main-search.html' not found or unable to stat, referer: http://192.168.1.125/index.php
[Thu Sep 03 21:20:13 2015] [error] [client 192.168.1.226] script 'C:/amp/Apache/htdocs/main-search.html' not found or unable to stat, referer: http://192.168.1.125/index.php
[Thu Sep 03 21:34:39 2015] [error] [client 192.168.1.226] script 'C:/amp/Apache/htdocs/search.html' not found or unable to stat, referer: http://192.168.1.125/index.php
[Thu Sep 03 21:34:40 2015] [error] [client 192.168.1.226] script 'C:/amp/Apache/htdocs/search.html' not found or unable to stat, referer: http://192.168.1.125/index.php
[Thu Sep 03 21:34:40 2015] [error] [client 192.168.1.226] script 'C:/amp/Apache/htdocs/search.html' not found or unable to stat, referer: http://192.168.1.125/index.php
[Thu Sep 03 21:34:42 2015] [error] [client 192.168.1.226] client denied by server configuration: C:/amp/Apache/htdocs/.htaccess
[Thu Sep 03 21:34:44 2015] [error] [client 192.168.1.226] client denied by server configuration: C:/amp/Apache/htdocs/.htaccess
[Thu Sep 03 21:34:50 2015] [notice] Parent: Received restart signal -- Restarting the server.
[Thu Sep 03 21:34:50 2015] [notice] Child 3612: Exit event signaled. Child process is ending.

.htaccess

BEGIN

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L]

END


设置如下
LoadModule rewrite_module modules/mod_rewrite.so


    Options FollowSymLinks
        AllowOverride All
        Order deny,allow
        Allow from all




2015-09-03 21:46:16

#2 jake

对初学者来说,自行配置windows上面的apache相对比较难。

建议使用xampp,伪静态没有任何问题。

2015-09-03 22:31:00

#3 星云无限

jake 发表于 2015-9-3 22:31
对初学者来说,自行配置windows上面的apache相对比较难。

建议使用xampp,伪静态没有任何问题。 ...
就想自己配置感觉能学习学习啊``

2015-09-05 21:16:12

#4 jake

星云无限 发表于 2015-9-5 21:16
就想自己配置感觉能学习学习啊``
可以百度一下 wordpress 的伪静态设置,按上面日志看来是没有生效的。

2015-09-06 08:44:46