CodeIgniter Rewrite Rules |
[eluser]IanMcQ[/eluser]
Hello, I am transferring a CodeIgniter application to another server. I am attempting to test the application on the new server at an IP address. I've got my CodeIgniter rewrite rules in an .htaccess. What's happening is 1.1.1.1/controller/method always renders the default controller (which my case is indexpage.php and the index() instance method. I tried switching my $config['base_url'] to 'http://1.1.1.1/' (from the domain) to see if that would make a difference, but unfortunately, the default controller always renders. http://1.1.1.1/index.php/controller/method links do work, though, which is good. I am just wondering if this would be a server configuration error (something not working as expected on the new server) or if CodeIgniter and rewrite rules don't play friendly with IP address-based sites. Just don't want to flip the switch to transfer my site and have all my URLs be broken. Thanks in advanced.
[eluser]Ckirk[/eluser]
Is it definitely a Linux server you're hosting on? If so can you post your htaccess content here?
[eluser]IanMcQ[/eluser]
Yes, it's definitely a Linux server. Here's what I have: Code: RewriteEngine on UPDATE I did some more research. Turns out my rewrite problem is a strange cPanel/Apache issue (my old server wasn't running cPanel, so that was the difference for me). Update config.php and change $config[‘uri_protocol’] = 'PATH_INFO'; to: Code: $config[‘uri_protocol’] = 'ORIG_PATH_INFO'; http://ellislab.com/forums/viewthread/207671/ |
Welcome Guest, Not a member yet? Register Sign In |