0

我已经使用 MAMP 一年多了,并且使用 Codeigniter 并且通常在设置网站时没有问题。我刚刚完成了一个网站并更改了基本 URL 和 .htaccess 文件,以便正确托管它。我更改了设置,这就是问题所在:

主文件显示在我的 htdocs 文件夹中(还有许多其他网站保存在本地),但是当我加载 MAMP 的起始页并且出现 dfile 名称列表时,除了这个文件之外,它们都在那里!我试图重命名它,检查了我的配置基 URL,这一切都很好....为什么文件不显示?!其他文件可以,当我单击链接时它们可以正常工作。

我也尝试在没有文件的情况下输入 url,这就是我得到的:

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, you@example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

所以当你这样做时,我检查了我的错误日志,在 apache_error.log 这是我收到的消息:

[Fri Jan 18 09:37:54 2013] [alert] [client 127.0.0.1] /Applications/MAMP/htdocs/website-name/.htaccess: <IfModule takes one argument, Container for directives based on existance of specified modules
[Fri Jan 18 09:37:55 2013] [alert] [client 127.0.0.1] /Applications/MAMP/htdocs/website-name/.htaccess: <IfModule takes one argument, Container for directives based on existance of specified modules

我的 .htaccess 文件和往常一样...

.htaccess 文件:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php
#controller, previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /website-name/index.php?/$1 [L]
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends
#the request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /website-name/index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>

这个文件会损坏吗?或者我在这个文件中的整个网站都损坏了?如果我能得到一些建议那就太好了,因为我以前从来没有遇到过这个问题

谢谢

4

0 回答 0