Welcome Guest, Not a member yet? Register   Sign In
Site is not running due to redirect mode of codeigniter
#1

[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
#2

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

[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
#4

[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.?
#5

[eluser]MianUsman[/eluser]
Hi,

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

config.php file for index_page.
#6

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

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


Thanks again for so much help




Theme © iAndrew 2016 - Forum software by © MyBB