Solved

IIS equivalent of Apache .htaccess mod rewrite for Code Igniter

Posted on 2014-10-27
5
454 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 108

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now