mod_rewrite Workaround

I have managed to work around the issue of not having mod_rewrite on my IIS hosting account. Since I can use by ASP.NET and PHP on a single site, I took advantage of the free UrlRewriter library and web.config settings. It’s actually pretty cool.  I have a new Health & Fitness Clickbank Mall site create that is all done using PHP, but I use a web.config file along with UrlRewriter to handle correctly rewriting URLs. The funky thing is that all of the URLs look like they are for aspx files, but they are actually all served up by my index.php file.  It may not be ideal or pretty, but it sure seems to work!

No mod_rewrite on IIS

Once again I have run smack into the reality that no hosting provider is perfect. While I have been quite happy with my Windows based DailyRazor hosting account I have just discovered an issue that is really bumming me out.  With DailyRazor I can use both PHP and ASP.NET on my sites, which is very cool. I created a new subdomain and developed the site using PHP.  I created a .htaccess file and put in my rewrite commands. When I ran it, however, the rewrite wasn’t working at all. The thing I forgot about is that mod_rewrite is specific to Apache and not PHP.  Since my site is running on IIS there is no mod_rewrite. 

So, I did some research. I did find an IIS addon product called IIS Mod-Rewrite from MicroNovae that looks promising.  I contact DailyRazor support to see if they had anything already installed or suggestions.  Unfortunately they weren’t much help. They said I could buy a license to IIS Mod-Rewrite and they would install it for me (which is certainly a decent option, but I’m not sure I want to buy the license and risk there being issues on a server I can’t administer myself).

I am considering another option, but need to really think it through to see if it would actually work.  I have some ASP.NET sites that are using a free URL Rewriter product. It works pretty good and does the same basic things that mod_rewrite does.  Since I can mix and match PHP and ASP.NET on my sites, I’m thinking I could use that ASP.NET URL rewriter product (which is configured via web.config) to do what I need.  I’m keeping my fingers crossed!

Next Page »