CodeIgniter Forums

Full Version: Site is not running due to redirect mode of codeigniter
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]MianUsman[/eluser]
Hi,

i m working on a codeigniter and my site is not working without writing index.php with URL and also it only shows default controller with index.php and it didn't run any other controller with OR without index.php


e.g. www.mysitename.com/index.php it show default controller
www.mysitename.com it show me the 404 page of codeigniter.
www.mysitename.com/anycontroller it show me the 404 page of codeigniter.
www.mysitename.com/index.php/mycontroller it show me the 404 page of codeigniter.


please help me out.


Thanks in Advanvce

Usman Abdul Razzaq

El Forum

[eluser]Mat-Moo[/eluser]
Have you setup a .htaccess file correctly? http://ellislab.com/codeigniter/user-gui.../urls.html

El Forum

[eluser]MianUsman[/eluser]
Hi,


i have setup htaccess correctly same as

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]


but its not making any difference in this situation.

Please help

Thanks In advance

Usman Abdul Razzaq

El Forum

[eluser]Mat-Moo[/eluser]
try
Code:
Options FollowSymLinks
RewriteEngine on

# Everything else to the CI controller
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
What have you got in the config.php file for index_page etc.?

El Forum

[eluser]MianUsman[/eluser]
Hi,

Code:
$config['index_page'] = "";

config.php file for index_page.

El Forum

[eluser]Mat-Moo[/eluser]
Change it back to index.php and remove the .htaccess - does it all work correctly again?

El Forum

[eluser]MianUsman[/eluser]
Thanks So much got the solution.


Thanks again for so much help