I have experience in running wordpress applications over IIS and it is very simple. After that I thought lets host the codeigniter application over IIS after that I found the error


codeigniter application run on IIS

After doing some official websites R&D I found the following solution, here are the steps for solving following queries

  1. How to host codeigniter application over IIS windows server
  2. How to resolve 404 File or directory not found over IIS windows serve


  1. Verify you have IIS installed on your windows server
  2. Verify you have installed URL_REWRITE module in your IIS

    IIS URL Rewrite module

    You can download url rewrite module from there https://www.iis.net/downloads/microsoft/url-rewrite

  3. Add new website and add your codeigniter code in this website folder
  4. Click on website and in feature tab click on URL rewrite , this will open the following window

    import url rewrite rules

    Import URL Rewrite Rules

  5.  Add copy code form .htaccess file and paste into Rewrite Rules than click on apply button , this should be something like thisRewriteEngine on
    RewriteCond $1 !^(index\.php|images|public|assets|uploads|themes|install|updates|asset|mob|robots\.txt)
    RewriteRule ^(.*)$ index.php?/$1 [QSA,L]#<FilesMatch “\.(jpg|jpeg|png|gif|swf|css)$”>
    # Header set Cache-Control “max-age=604800, public”


    Import htaccess rewrite url

    Now you can check your website it should working fine and should not give you 404 folder not found error

ENJOY your day, for help feel free to fill contact form


Comments are closed.

back to top
Get Free Quote