Codeigniter在本地服务器上运行正常,但在Web服务器上运行不正常 .
我使用 XAMPP
进行本地开发 .
我正在使用Parallels Plesk Panel 11.0.9 for Microsoft Windows .
404 error page of codeigniter is not loading. Url is loadind 404 error page of the server. I have removed all .htacces
rewrite rules of root directory and included index.php
. Still it isn't working.
搜索了很多,但找不到正确的解决方案
codeigniter文件夹的目录(站点,应用程序,系统)
是
mysite/httpdocs/demo/test/
mysite / httpdocs / demo / test / application / config / config.php中的基本URL
$config['base_url'] = 'http://mysite/httpdocs/demo/test/site/';
在mysite / httpdocs / demo / test / application / .htaccess中
Deny from all
在index.php中设置的安装(mysite / httpdocs / demo / test / site / index.php)
switch (dirname(__FILE__)) {
case 'http://mysite/httpdocs/demo/test/site':
define('ENVIRONMENT', 'development');
break;
default:
define('ENVIRONMENT', 'production');
break;
}
$system_path = '../system';
$application_folder = '../application';
在mysite / httpdocs / demo / test / site / .htaccess中
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
在mysite / httpdocs / demo / test / application / config / routes.php中
$route['default_controller'] = "page";
$route['404_override'] = 'page';
$route['article/(:num)/(:any)'] = 'article/index/$1/$2';
我正在给url mysite / demo / test / site和 its giving 404 error page of web server not of codeigniter
我在哪里错了?
2 回答
我联系了我的主人 . 他们说php处理程序有问题 .
除了这个IIS没有读取
.htaccess
文件,而是我创建一个文件web.config
并在mysite / httpdocs / demo / test / site /中用.htaccess
替换web.config
文件的内容是现在网站已经启动并运行 . Thanks for the support .
我还不能评论,所以我会去回答 .
如果您有
.htaccess
文件并且您有权访问服务器,请检查您的项目根目录,如果启用了mod_rewrite
(假设您使用的是Apache),也可以检查 . 这可能是URL重写问题 .EDIT 1
好的,我现在看到你有一个
.htaccess
文件 . 你的httpd.conf中的<Directory>
指令怎么样,还是通过<VirtualHost>
设置?EDIT 2
尝试使用以下方法更改
.htaccess
: