Solved

IIS equivalent of Apache .htaccess mod rewrite for Code Igniter

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…
This video teaches users how to migrate an existing Wordpress website to a new domain.

708 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

19 Experts available now in Live!

Get 1:1 Help Now