启用重写模块

时间:2015-10-24 21:22:34

标签: apache wamp wampserver

在Windows上安装WampServer后,我尝试访问我的网站但是我遇到了这样的信息:

enter image description here

所以我通过菜单Apache→Apache modules→rewrite_module启用了mod-rewrite。但现在我面对这条错误信息:

enter image description here

这是apache_error文件:

[Sat Oct 24 16:51:02.884800 2015] [mpm_winnt:notice] [pid 3244:tid 392] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Sat Oct 24 16:51:04.912800 2015] [mpm_winnt:notice] [pid 2940:tid 308] AH00364: Child: All worker threads have exited.
[Sat Oct 24 16:51:04.928400 2015] [mpm_winnt:notice] [pid 3244:tid 392] AH00430: Parent: Child process 2940 exited successfully.
[Sat Oct 24 16:51:05.646000 2015] [mpm_winnt:notice] [pid 4104:tid 396] AH00455: Apache/2.4.9 (Win32) PHP/5.5.12 configured -- resuming normal operations
[Sat Oct 24 16:51:05.646000 2015] [mpm_winnt:notice] [pid 4104:tid 396] AH00456: Apache Lounge VC11 Server built: Mar 16 2014 12:13:13
[Sat Oct 24 16:51:05.646000 2015] [core:notice] [pid 4104:tid 396] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.9\\bin\\httpd.exe -d C:/wamp/bin/apache/apache2.4.9'
[Sat Oct 24 16:51:05.661600 2015] [mpm_winnt:notice] [pid 4104:tid 396] AH00418: Parent: Created child process 4184
[Sat Oct 24 16:51:06.160800 2015] [mpm_winnt:notice] [pid 4184:tid 312] AH00354: Child: Starting 64 worker threads.

我尝试制作虚拟主机和别名,但它没有解决任何问题。我找到了不同的论坛和人们谈论.htaccess文件,但我不知道它是否与我的问题有关。

我想知道是什么引发了这个错误以及如何解决它。

编辑1:

在apache错误日志中我发现了这个错误:

AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

经过一些研究,我认为这可能是由于.htaccess文件中的一些规则造成的。

这是我的.htaccess文件:

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule  ^$ public/    [L]
    RewriteRule  (.*) public/$1 [L]
</IfModule>

0 个答案:

没有答案