![]() |
NGinX and CI 2.0 using rewrite - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: NGinX and CI 2.0 using rewrite (/showthread.php?tid=38799) |
NGinX and CI 2.0 using rewrite - El Forum - 02-18-2011 [eluser]Ashes-to-Ashes[/eluser] I have 1.7.3 working with NginX and hiding the index.php, but in CI 2.0 it's not working. Any ideas? Did something change in the way it handles the url? NGinX and CI 2.0 using rewrite - El Forum - 02-18-2011 [eluser]Basketcasesoftware[/eluser] I have a simple .htaccess file that works on my XAMPP system for what you want (hiding the index.php file). Took me some trial and error, but it's working consistently with my 2.0 setup. Here's the code: Code: RewriteEngine on May depend entirely on your server's setup of course and which version of PHP. I hope it helps though. NGinX and CI 2.0 using rewrite - El Forum - 02-18-2011 [eluser]Sire[/eluser] I use nginx also. When I switched to CI 2.0, what I had to change was the routing method from AUTO I think, to QUERY_STRING. in config/config.php $config['uri_protocol'] = "QUERY_STRING"; NGinX and CI 2.0 using rewrite - El Forum - 02-21-2011 [eluser]Ashes-to-Ashes[/eluser] I think those rewrite rules are Apache. I will post mine, as soon as I can. I will post the working CI 1.7.3 ones, and hopefully if no one can help me I will get it figured out and post the result here. NGinX and CI 2.0 using rewrite - El Forum - 02-21-2011 [eluser]Ashes-to-Ashes[/eluser] [quote author="Sire" date="1298116557"]I use nginx also. When I switched to CI 2.0, what I had to change was the routing method from AUTO I think, to QUERY_STRING. in config/config.php $config['uri_protocol'] = "QUERY_STRING";[/quote] That did not seem to be the problem. Are you using rewrites to hide index.php? Or is this just to get the URLs working. Currently I am using query string support, but I think that it will work without that with a bit of tweaking, so I am really just trying to focus on the one thing of trying to hide index.php using a rewrite. NGinX and CI 2.0 using rewrite - El Forum - 02-21-2011 [eluser]Ashes-to-Ashes[/eluser] Following is my nginx site file: Code: server Commented out are the attempts to hide index.php Any suggestions are welcome. , Ash |