nginx code igniter remove index.php prefix

Objective

Remove the index.php prefix from your nginx code igniter instance.

Assumptions

  • In your main nginx conf file you define how php is called (unix socket or ip:port)
  • You will replace foo.example.com with whatever your domain name is
  • The proper logging path will be defined per your system as opposed to the location i have used

Configurations

Example upstream in main nginx conf

Virtual Host to remove index.php

Here’s how i did it:

CodeIgniter Specific Info

After this, make sure that your codeIgniter config.php contains the following information:

Still not working?

Try following the CodeIgniter http://ellislab.com/codeigniter/user_guide/tutorial/static_pages.html

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">