0

After developing an application using codeigniter,i have uploaded files to my server.I can successfully open the homepage but cannot navigate further.When i navigate 404 error is shown.Application has all the pages inside folders.

Also have given the baseurl as current folder :

http://www.xxxx.com/abc/

Routes :

$route['login'] = "home/login";

As a beginner in Codeigniter have no clues on whats happening. Note : Updated Htaccess file:

IndexIgnore *
ErrorDocument 404 /assets/php/404.php
ErrorDocument 403 /assets/php/403.php

RewriteEngine on
RewriteBase /

#These are the original rewrites, but might cause problems with some server configs.
#RewriteCond $1 !^(index\.php|assets|user_guide|robots\.txt)
#RewriteRule ^(.*)$ /index.php/$1 [L]

#These conditions are tested to work, and should be a better alternative to the commented ones above.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]


<FilesMatch "\.(ico|jpg|jpeg|png|gif)$">
Header set Cache-Control "max-age=290304000, public"
</FilesMatch>

Any help..

Tharif
  • 13,794
  • 9
  • 55
  • 77
  • and how your `.htaccess` looks like ? check in root directory and paste code, if that doesn't exist, create a new one – viral Jul 01 '15 at 09:56
  • @Viral no htaccess added – Tharif Jul 01 '15 at 09:57
  • you may need index.php `http://www.xxxx.com/index.php/abc/` –  Jul 01 '15 at 09:58
  • `routes.php` as follows: `$route["login(.*)"] = "home/login$1";` – Saty Jul 01 '15 at 09:58
  • Then, try `http://www.xxxx.com/index.php/abc/` if you succeed, add a new htaccess. Get help from [here](https://gist.github.com/philipptempel/4226750) – viral Jul 01 '15 at 09:58
  • @wolfgang1983 it loads the domain xxx.com – Tharif Jul 01 '15 at 10:01
  • @utility if you have not set up your htaccess and codeigniter config.php to remove your index.php then in every url needs to have index.php `redirect('index.php/somepage)` and or `` –  Jul 01 '15 at 10:11
  • @wolfgang1983 let me create htaccess then.. – Tharif Jul 01 '15 at 10:16
  • I use this link quite a bit https://github.com/riwakawebsitedesigns/htaccess_for_codeigniter good for windows users have not tried any on linux yet –  Jul 01 '15 at 10:25
  • What is your default controller in your config file? – sotoz Jul 01 '15 at 21:20
  • Also try adding `RewriteBase /abc/` on your .htaccess – sotoz Jul 01 '15 at 21:21

0 Answers0