CodeIgniter Forums
Live version of the website is not loading other controllers - keeps showing the default page - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: Live version of the website is not loading other controllers - keeps showing the default page (/thread-12542.html)

Pages: 1 2


Live version of the website is not loading other controllers - keeps showing the default page - El Forum - 10-22-2008

[eluser]davetao[/eluser]
Hi Folks,

Having some very strange issues and was wondering if anyone has come across it.

I have a code igniter website that is working fine on my localhost, I can access a controller called feed on my website and it shows a blank page as it should.

I then upload it through FTP to a live linux server and when i go to the feed controller, it shows me the content from the welcome controller.

Any ideas as to why?

I have a feeling that it might have something to do with either my filenames or htaccess.

the htacess file is as follows..

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

Much appreciated for any help provided


Live version of the website is not loading other controllers - keeps showing the default page - El Forum - 10-22-2008

[eluser]Randy Casburn[/eluser]
Logically what you are saying doesn't make sense unless:

1) both "welcome controller" and "feed controller" have the exact same content
2) the feed controller doesn't exist and your default controller is being called
3) your routing is screwed up
4) CI does not recognize the URI

What happens when you use:

http://yourdomain.com/index.php/feed

into the browser's address bar? (please note the inclusion of index.php)

Randy


Live version of the website is not loading other controllers - keeps showing the default page - El Forum - 10-22-2008

[eluser]davetao[/eluser]
http://yourdomain.com/index.php/feed

does work so i guess that means that the htaccess mod_rewrite isnt working


Live version of the website is not loading other controllers - keeps showing the default page - El Forum - 10-22-2008

[eluser]Randy Casburn[/eluser]
Great! So now you'll just need to run php_info() on your local machine and on your remote server. Do a comparison to determine the differences. See if you can identify where the SUPER global name space is being mangled or changed in one vs. the other.

That should get you set on the road to recovery. If you can't get things settle post up some more questions.

Randy


Live version of the website is not loading other controllers - keeps showing the default page - El Forum - 10-22-2008

[eluser]davetao[/eluser]
What is "SUPER global name space"?

As far as I can see, there is no mention of mod_rewrite on the remote server so i guess that would be the main problem.
So i sent a tech email to get it included..

Thanks Randy.


Live version of the website is not loading other controllers - keeps showing the default page - El Forum - 10-22-2008

[eluser]Randy Casburn[/eluser]
We were going to go down the road of setting your path settings to PATH_INFO or ORIG_PATH_INFO etc. That will depend on your server. Of course, mod_rewrite working at all kinda depends on the module being loaded in the first place. hehehe.

Glad to help.

Take care,

Randy


Live version of the website is not loading other controllers - keeps showing the default page - El Forum - 10-22-2008

[eluser]davetao[/eluser]
Just got word from the host and apparently the mod_rewrite is working.

Is there something wrong with my .htaccess file?

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


Live version of the website is not loading other controllers - keeps showing the default page - El Forum - 10-22-2008

[eluser]Randy Casburn[/eluser]
Compare the php_info() outputs from both servers, record the differences and then search these forums for topics on the whole "What's wrong with my .htaccess file" thing. There is no reason the rewrite all that history here.

Randy


Live version of the website is not loading other controllers - keeps showing the default page - El Forum - 10-22-2008

[eluser]davetao[/eluser]
No worries. thanks


Live version of the website is not loading other controllers - keeps showing the default page - El Forum - 10-22-2008

[eluser]Rick Jolly[/eluser]
Who's hosting your site?