Codeigniter is working fine on local server but not on web server.
I used XAMPP
for the development on local.
I am using 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.
Searched alot but couldn't find right solution
Directory for codeigniter folders(site, application, system)
is
mysite/httpdocs/demo/test/
Base url in mysite/httpdocs/demo/test/application/config/config.php
$config['base_url'] = 'http://mysite/httpdocs/demo/test/site/';
In mysite/httpdocs/demo/test/application/.htaccess
Deny from all
Envoirment set in 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';
In 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>
In mysite/httpdocs/demo/test/application/config/routes.php
$route['default_controller'] = "page";
$route['404_override'] = 'page';
$route['article/(:num)/(:any)'] = 'article/index/$1/$2';
I am giving url mysite/demo/test/site and
its giving 404 error page of web server not of codeigniter
Where am I wrong here?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…