0
votes

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

1
@kiran-padeshi Are you uses in your code site_url() or base_url() on your link tags. If You had use site_url() then change it to base_url(), because site_url() by default add index.php - Ajeet Kumar
I am using base_url() - Kiran Pardeshi
Parivar is folder under my emahapolitician.in domain and admin is subfolder in Parivar and both Parivar and admin is in codeigniter framework. Parivar is frntend and admin is backend - Kiran Pardeshi
Try to Access directly that means [link](domain_name/front_controller_name/function_name) and [link](domain_name/admin/front_controller_name/function_name) if its accessible than your setting or route or .htaccess has problem. Try to write there any link which is shown in anchor tag(when your first page is accessible) - Ajeet Kumar
And check your server support re-write rule - Ajeet Kumar

1 Answers

0
votes

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.