【发布时间】:2012-11-30 04:02:02
【问题描述】:
我将我的 Web 项目加载到一个新安装的 wamp 应用程序中,当我单击指向该网站其他页面的链接时,它被定向到 phpmyadmin 主页。我的 web 项目是使用 codeigniter 框架开发的。
根据apache的错误日志,
[2012 年 12 月 12 日星期三 16:56:38] [错误] [客户端 127.0.0.1] 文件没有 存在:C:/wamp/www/mathplication/about,引用者: [2012 年 12 月 12 日星期三 16:56:40] [错误] [客户端 127.0.0.1] 文件不存在:C:/wamp/www/assets
在htacess文件中,内容如下
RewriteEngine On RewriteBase /mathplication/ #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.* RewriteCond $1 !^(index\.php) RewriteRule ^(.*)$ /index.php?/$1 [L] #When your application folder isn't in the system folder #This snippet prevents user access to the application folder #Submitted by: Fabdrol #Rename 'application' to your applications folder name. RewriteCond %{REQUEST_URI} ^application.* RewriteRule ^(.*)$ /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 ^(.*)$ index.php?/$1 [L] </IfModule>
但错误仍然存在。
不确定我还能检查什么。提前感谢您的帮助!
【问题讨论】:
-
所以你说这是因为 .htaccess 文件
-
哦,我不确定问题出在哪里。但是当我搜索它时,他们中的大多数都提到了 .htaccess 文件。
-
k 尝试使用我发布的代码作为答案........如果它不起作用,请告诉我............
标签: apache codeigniter wamp