Using CakePHP with GoDaddy IIS 7 IIS7 and Microsoft URL Rewriter
Posted
by ricky
on Stack Overflow
See other posts from Stack Overflow
or by ricky
Published on 2010-04-23T22:20:14Z
Indexed on
2010/04/23
22:23 UTC
Read the original article
Hit count: 637
Hi, I'm trying to move a CakePHP app from a Windows Apache setup to a GoDaddy shared IIS7 setup. It's been easy to migrate except for the Apache mod_rewrite part -- which obviously wouldn't work in IIS7. I basically have no url rewriting capability, which is crucial for Cake to work. GoDaddy now offers MS URL Rewriter, but they don't offer technical support for it. I haven't seen any blog post that discusses how to do this in detail. I'd really like to avoid third-party software, especially since GoDaddy provides MS URL Rewriter, which ought to be more than sufficient.
The mod_rewrite directives that will allow Cake to work on GoDaddy look ridiculously easy (pasted below); can someone help me convert it to a web.config I can use with URL Rewriter? The URL Rewriter manual is really long and complicated. I'd rather not have to read the whole thing if I don't have to.
Here's the contents of the apache .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php?url=$1 [QSA,L]
</IfModule>
Here's a link that discusses GoDaddy's limited support for URL Rewriter:
http://stackoverflow.com/questions/416727/url-rewriting-under-iis-at-godaddy
Many thanks!
Rich
© Stack Overflow or respective owner