So, my co-worker and I spent a full day trying to figure out how to enable CakePHP-IIS-ISAPI Rewrite and after struggling a little, we demystified how to enable ISAPI Rewrite on IIS and I figure I'd share it here since everyone here has helped me out tremendously. :)
For the longer version, you can read about it here: http://blog.localkinegrinds.com/2006/07/28/cakephp-and-iis-solved/ For the shorter version: Step 1. Setup define('IIS_SERVER', true); Step 2. Download ISAPI Rewrite Step 3. Setup virtual directory in IIS to point to CAKE_INSTALL/app/webroot Step 4. Change httpd.ini file (the second rule) to the following: RewriteRule ^/virtual_directory_name_here/(.*)/ /virtual_directory_name_here/index.php?url=/$1 Step 5. If you're using $html->link, make sure that all your links end with slashes. You can read more about it on the blog posting I made, but I didn't know how to get the equivalent of RewriteCond %{REQUEST_FILENAME} !-f with the ISAPI Rewrite dll. The end slash matches files not served up by webroot directory. Step 6. To enable the virtual_directory in the subsequent link names, make sure to define('WEBROOT_DIR', 'virtual_directory_name') in the app/webroot/index.php and voila... ISAPI Rewrite should be working. :) If you have any questions, or if you can think up a better RewriteRule, feel free to contact me, I only had a day to look at it, so we just wanted something quick and dirty to work. Btw, keep on baking. :) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~----------~----~----~----~------~----~------~--~---
