Solved

IIS equivalent of Apache .htaccess mod rewrite for Code Igniter

Posted on 2014-10-27
5
459 Views
Last Modified: 2014-10-28
Hi Experts

I have a Windows server running IIS6 and I am trying to put together a PHP app using CodeIgniter. I want to remove the index.php from the URLs and with Apache this is easily achieved with a .htaccess file. What's the equivalent in IIS6? I've found other similar solutions on here but not quite what I need. I thought I'd mention CodeIgniter as I'm sure I'm not the first PHP developer to need to do the same thing using this framework (or a similar one).

Thanks
0
Comment
Question by:davidcowler
5 Comments
 
LVL 63

Accepted Solution

by:
Simon Butler (Sembee) earned 500 total points
ID: 40408137
As far as I am aware there is no equivalent on IIS 6. Upgrade to something more modern - IIS 7 or 7.5 (Windows 2008 or higher) and you get the rules engine which can do it very easily.

Simon.
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 40408405
No points for this, please, but why not just get Linux?  It's free, open source, far more mainstream than Windows and it does what you need!
0
 
LVL 1

Author Comment

by:davidcowler
ID: 40408543
Hi gentlemen, thanks for your comments. Though Linux (with Apache) is the obvious answer, and one I have considered, my IT department won't entertain that idea as they have little experience of it (we work in a Windows-based environment only). Eventually the entire project will be on a new server, which will indeed be the latest version of Windows Server and IIS, and I can work around this for now by allowing the index.php in the Code Igniter URLs, which is fine for now. On that basis I will give the points to Simon. Thanks again for your suggestions.
0
 
LVL 50

Expert Comment

by:Steve Bink
ID: 40408552
I agree with Ray, and your initial statement - Apache makes this cake.

If you're stuck with IIS, I'd agree with Simon Butler - upgrading to IIS7 or 7.5 is going to take some pain out of your life.

If you're absolutely stuck with IIS6, though, there are other options.  I've used Helicon's ISAPI Rewrite in the past, and it works so similarly to Apache's .htaccess files that the learning curve is next to none.
0
 
LVL 50

Expert Comment

by:Steve Bink
ID: 40408557
Guess that will teach me to check my email sooner..  :/
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question