CodeIgniter Forums
[CI 2.x?] 404 Page Not Found error - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: [CI 2.x?] 404 Page Not Found error (/showthread.php?tid=65465)



[CI 2.x?] 404 Page Not Found error - premalathadavis - 06-14-2016

I am new to codeigniter. I am writing code for subscription management. Initially it works fine in both local and server. Before 2 days i face problem 404 Page Not Found in my server. So i set route. 

$route['default_controller'] = "home";
$route['subscription'] = 'subscription/index';
$route['subscription/subscription/(:any)'] = 'subscription/$1/$2';
$route['subscription/dealer/(:any)'] = 'dealer/$1/$2';
$route['subscription/despatch/(:any)'] = 'despatch/$1/$2';

After that subscription and dealer is working fine. Despatch is not working. 

Then i try to create new method inside controller/subscription/subscription.php 
ie; function test(){
echo "hello";
}
 
call like this http://58.68.14.244:1234/subscription/subscription/test/modid/9 
i got error, page not found.

my htaccess file

<IfModule mod_rewrite.c> 
DirectoryIndex index.php
RewriteEngine on
RewriteBase /imanager/
#RewriteRule ^index\.php$ - [L] 
#RewriteCond $1 !^(index\.php|(.*)\.swf|forums|images|css|downloads|jquery|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L] 
#RewriteRule ^(.*)$ ./index.php?$1 [L,QSA]
</IfModule>


I am attaching the despatch.php file also.

I am very confused how to solve this error.

Kindly help me.....

Premalatha davis