我已经使用MAMP超过一年了,并且使用Codeigniter并且通常在设置网站时没有问题。我刚刚完成了一个网站并更改了基本URL和.htaccess文件,因此它将被正确托管。我更改了设置,这就是问题所在:
主文件显示在我的htdocs文件夹中(本地保存了许多其他网站),但是当我加载MAMP的起始页面并且列表出现dfile名称时,它们都与此文件分开!香港专业教育学院试图重新命名,检查我的配置基本网址,这一切都很好....为什么文件不显示?!其他文件,当我点击链接,他们工作正常。
我也试过在没有文件的情况下输入网址,这就是我得到的:
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>
此文件可能已损坏吗?或者我在这个文件中的整个网站是否已损坏? 如果我能得到一些建议,那就好了,因为我之前从未遇到过这个问题
由于