-1

I have used redirect on my codeigniter project just after login page.

like

redirect('profile/edit/1'); 

and am seeing a url like

http://mypreoject.com/index.php/profile/edit/1

and , my page background image was unable to load.

i have used .htaccess mode write so this was not supposed to be happening and i should have get the following.

http://mypreoject.com/profile/edit/1
Develop4Life
  • 7,581
  • 8
  • 58
  • 76

2 Answers2

1

If you are using Apache place a .htaccess file in your root web directory containing the following:

RewriteEngine on RewriteCond $1 !^(index\.php|[Javascript / CSS / Image root Folder name(s)]|robots\.txt) RewriteRule ^(.*)$ /index.php/$1 [L]

0

If CI controller -> action is working fine in both urls

http://mypreoject.com/profile/edit/1

http://mypreoject.com/index.php/profile/edit/1

then .htacces is fine, you should check /application/config/config.php index_page key

change

$config['index_page'] = 'index.php';

to

$config['index_page'] = '';
Community
  • 1
  • 1
Girish
  • 11,907
  • 3
  • 34
  • 51