我将我的web项目加载到一个刚刚安装的wamp应用程序中,当我点击指向我网站其他页面的链接时,它被定向到phpmyadmin主页。我的web项目是使用codeigniter框架开发的。
根据apache错误日志,
[Wed Dec 12 16:56:38 2012] [错误] [客户端127.0.0.1]文件没有 存在:C:/ wamp / www / mathplication / about,referer: [Wed Dec 12 16:56:40 2012] [错误] [client 127.0.0.1]文件不存在:C:/ wamp / www / assets
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>
但错误仍然存在。
不确定我还能检查什么。在此先感谢您的帮助!
答案 0 :(得分:1)
尝试使用此代码............
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
删除.htaccess
文件