Title: A somewhat different &quot;CGI Error&quot;
Last modified: August 19, 2016

---

# A somewhat different "CGI Error"

 *  [thomascheah](https://wordpress.org/support/users/thomascheah/)
 * (@thomascheah)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/a-somewhat-different-cgi-error/)
 * Hi, I am hosting my WordPress site on a Windows based shared hosting environment.
   I know this “CGI Error” problem is a very famous issue when comes to hosting 
   WordPress on IIS. Before you turn away from this post, let me assure you that
   my case will be probably different than the previous ones.
 * Before I upgraded to 3.0.1 (from 2.3.1), I have sorted out the pretty permalink
   isse via the wp-404-handler.php workaround. As a reference, my wp-404-handler.
   php file looks like this,
 *     ```
       <?php
         $qs = $_SERVER['QUERY_STRING'];
         $pos = strrpos($qs, '://');
         $pos = strpos($qs, '/', $pos + 4);
         $_SERVER['REQUEST_URI'] = substr($qs, $pos);
         $_SERVER['PATH_INFO'] = $_SERVER['REQUEST_URI'];
         include('index.php');
       ?>
       ```
   
 * After I upgraded to WP 3.0.1, the pretty permalink is still working fine, but
   whenever I include the ‘index.php’ in the permalink, it only works on my posts,
   but I will get a “CGI Error” on pages.
 * For instances, I can access my site very well using the pretty permalink for 
   the following post and page,
 * Post:
    [http://www.procto.biz/business-and-industry/how-geeks-screw-up-startup-top-10-techie-traits-that-kill-your-business/](http://www.procto.biz/business-and-industry/how-geeks-screw-up-startup-top-10-techie-traits-that-kill-your-business/)
 * Page:
    [http://www.procto.biz/services/](http://www.procto.biz/services/)
 * But when I include the ‘index.php’ in the url, the page url will cause “CGI Error”.
 * Post (this will work ok):
    [http://www.procto.biz/index.php/business-and-industry/how-geeks-screw-up-startup-top-10-techie-traits-that-kill-your-business/](http://www.procto.biz/index.php/business-and-industry/how-geeks-screw-up-startup-top-10-techie-traits-that-kill-your-business/)
 * Page (this will cause “CGI error):
    [http://www.procto.biz/index.php/services/](http://www.procto.biz/index.php/services/)
 * I think this does not happen before I upgraded to 3.0.1.
 * You may ask why do I need to make this work. The reason is because I am using
   ContactForm7 plugin in some of my WP pages, and ContactForm7 plugin requires 
   the submission url in the latter form (with the index.php as part of the form
   submission url) in order to work properly.
 * Any guidance will be much appreciated. Thanks in advance!

Viewing 1 replies (of 1 total)

 *  Thread Starter [thomascheah](https://wordpress.org/support/users/thomascheah/)
 * (@thomascheah)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/a-somewhat-different-cgi-error/#post-1632740)
 * Hmm… anyone? I had confused everyone here. 🙁

Viewing 1 replies (of 1 total)

The topic ‘A somewhat different "CGI Error"’ is closed to new replies.

## Tags

 * [cgi error](https://wordpress.org/support/topic-tag/cgi-error/)
 * [iis](https://wordpress.org/support/topic-tag/iis/)
 * [page](https://wordpress.org/support/topic-tag/page/)
 * [permalink](https://wordpress.org/support/topic-tag/permalink/)
 * [post](https://wordpress.org/support/topic-tag/post/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [thomascheah](https://wordpress.org/support/users/thomascheah/)
 * Last activity: [15 years, 7 months ago](https://wordpress.org/support/topic/a-somewhat-different-cgi-error/#post-1632740)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
