【发布时间】:2016-03-12 09:43:26
【问题描述】:
我正在使用 codeigniter 并学习 CMS 教程。我已经在我的根目录中添加了 .htaccess。
这是我的 .htaccess 文件:
<IfModule mod_rewrite.cs>
RewriteEngine on
RewriteCond $1 !^(index\.php|public|\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1
</IfModule>\
我还在位于 httpd.conf 的 wamp 中启用了我的 .htaccess 并进行了更改
#LoadModule rewrite_module modules/mod_rewrite.so
到
LoadModule rewrite_module modules/mod_rewrite.so
这是我在 Apache wamp 中的错误登录:
[Sat Mar 12 17:26:36 2016] [notice] Apache/2.2.17 (Win32) PHP/5.3.5 configured -- resuming normal operations
[Sat Mar 12 17:26:36 2016] [notice] Server built: Oct 18 2010 01:58:12
[Sat Mar 12 17:26:36 2016] [notice] Parent: Created child process 372
[Sat Mar 12 17:26:36 2016] [notice] Child 372: Child process is running
[Sat Mar 12 17:26:36 2016] [notice] Child 372: Acquired the start mutex.
[Sat Mar 12 17:26:36 2016] [notice] Child 372: Starting 64 worker threads.
[Sat Mar 12 17:26:36 2016] [notice] Child 372: Starting thread to listen on port 80.
[Sat Mar 12 17:26:41 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:43 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:43 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:43 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:44 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:44 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:44 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:44 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:44 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:45 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:45 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:45 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:45 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:46 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:46 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:46 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:46 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:46 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:47 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:47 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:47 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:47 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:47 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:48 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:48 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:48 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:52 2016] [alert] [client 127.0.0.1] C:/wamp/www/cms/application/.htaccess: Expected </IfModule> but saw </IfModule>>
[Sat Mar 12 17:26:52 2016] [error] [client 127.0.0.1] client denied by server configuration: C:/wamp/www/cms/system/
[Sat Mar 12 17:26:52 2016] [error] [client 127.0.0.1] client denied by server configuration: C:/Dev, referer: http://localhost/cms/
[Sat Mar 12 17:26:52 2016] [error] [client 127.0.0.1] client denied by server configuration: C:/Dev, referer: http://localhost/cms/
[Sat Mar 12 17:26:52 2016] [error] [client 127.0.0.1] client denied by server configuration: C:/Dev, referer: http://localhost/cms/
[Sat Mar 12 17:27:03 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/public/admin
[Sat Mar 12 17:28:01 2016] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Sat Mar 12 17:28:01 2016] [notice] Child 372: Exit event signaled. Child process is ending.
[Sat Mar 12 17:28:02 2016] [notice] Child 372: Released the start mutex
[Sat Mar 12 17:28:03 2016] [notice] Child 372: All worker threads have exited.
[Sat Mar 12 17:28:03 2016] [notice] Child 372: Child process is exiting
[Sat Mar 12 17:28:03 2016] [notice] Parent: Child process exited successfully.
[Sat Mar 12 17:28:04 2016] [notice] Apache/2.2.17 (Win32) PHP/5.3.5 configured -- resuming normal operations
[Sat Mar 12 17:28:04 2016] [notice] Server built: Oct 18 2010 01:58:12
[Sat Mar 12 17:28:04 2016] [notice] Parent: Created child process 3996
[Sat Mar 12 17:28:04 2016] [notice] Child 3996: Child process is running
[Sat Mar 12 17:28:04 2016] [notice] Child 3996: Acquired the start mutex.
[Sat Mar 12 17:28:04 2016] [notice] Child 3996: Starting 64 worker threads.
[Sat Mar 12 17:28:04 2016] [notice] Child 3996: Starting thread to listen on port 80.
[Sat Mar 12 17:29:33 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/public/admin
[Sat Mar 12 17:30:04 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/public/admin
[Sat Mar 12 17:32:21 2016] [warn] pid file C:/wamp/bin/apache/Apache2.2.17/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Mar 12 17:32:22 2016] [notice] Apache/2.2.17 (Win32) PHP/5.3.5 configured -- resuming normal operations
[Sat Mar 12 17:32:22 2016] [notice] Server built: Oct 18 2010 01:58:12
[Sat Mar 12 17:32:22 2016] [notice] Parent: Created child process 3360
[Sat Mar 12 17:32:22 2016] [notice] Child 3360: Child process is running
[Sat Mar 12 17:32:22 2016] [notice] Child 3360: Acquired the start mutex.
[Sat Mar 12 17:32:22 2016] [notice] Child 3360: Starting 64 worker threads.
[Sat Mar 12 17:32:22 2016] [notice] Child 3360: Starting thread to listen on port 80.
[Sat Mar 12 17:32:30 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/favicon.ico, referer: http://localhost/cms/public/index.php/welcome/
[Sat Mar 12 17:32:54 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/public
[Sat Mar 12 17:33:51 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/public
[Sat Mar 12 17:40:24 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/public
【问题讨论】:
-
删除 .htaccess 文件。
-
在此服务器上找不到请求的 URL /cms/public/admin/migration。
-
在此服务器上找不到请求的 URL /cms/admin/migration。
-
似乎 apache 服务器在
<\IfModule>之后不喜欢足够的字符。从 17:26:52 开始阅读行。尝试先解决这个问题。
标签: php apache .htaccess codeigniter