Reputation: 85
I am new to Codeigniter. I have created bootstrap CMS Site using Codeigniter,This site Also have admin panel.
When I running this on Localhost Its working perfectly.Folder and Sub Folder as well.
localhost link :http://localhost/Parivar/ -- for front end
http://localhost/Parivar/admin/ --- For backend
I have hosted this on Server
My Server link is:http://www.emahapolitician/Parivar/ --- for front end http://www.emahapolitician/Parivar/admin/ --- for backend
when I running this online first link is running perfectly,but automatically includes index.php file ,But i already removed it from my config.php file.
My .htaccess file for http://www.emahapolitician/Parivar/
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|fonts|js|uploads|upload|img|floorplan|mainslider|projectslider|robots\.txt)
RewriteRule ^(.*)$ http://www.emahapolitician.in/Parivar/index.php/$1 [L]
My .htaccess file for http://www.emahapolitician/Parivar/admin
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|fonts|js|uploads|upload|img|floorplan|mainslider|projectslider|robots\.txt)
RewriteRule ^(.*)$ http://www.emahapolitician.in/Parivar/admin/index.php/$1 [L]
I also removed base_url and index.php file from config.php.
Also admin is subfolder of Parivar and Both Folders are in codeigniter.
When I running this link http://www.emahapolitician/Parivar/admin/
It shows page not found error.
So Please help to resolve this issue
Upvotes: 0
Views: 637
Reputation: 1215
you need to configure your routes.php file under application/config directory. in your routes.php add a route like-
$route['Parivar/admin'] = 'the controller where you want to go';
then when the server will get this url it will redirect to your desired controller.
Upvotes: 0