we.config and cakephp applications

Is there a way to use web.config to replace .htaccess for a cakephp app on iis?

current .htaccess file

<IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^$ webroot/ [L] RewriteRule (.*) webroot/$1 [L] </IfModule>


Used import in IIS6. It gives me this web.config, but site does not work. I get a white screen. Also tried this http://book.cakephp.org/revisions/view/19937/URL-Rewrites-on-IIS7-Windows-hosts, and it didnt work either.

<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="Imported Rule 1" stopProcessing="true"> <match url="^$" ignoreCase="false" /> <action type="Rewrite" url="webroot/" /> </rule> <rule name="Imported Rule 2" stopProcessing="true"> <match url="(.*)" ignoreCase="false" /> <action type="Rewrite" url="webroot/{R:1}" /> </rule> </rules> </rewrite> </system.webServer> </configuration>

-------------Problems Reply------------

Install the Microsoft URL Rewrite module for IIS. It'll let you import your apache rewrite rules. You can find the module here:


I use it with CakePHP on IIS 7.0 and 7.5 and it works a treat.


Can you try this configuration for me?

<?xml version="1.0" encoding="UTF-8"?>
<clear />
<rule name="Imported Rule 1-1" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<action type="Rewrite" url="/webroot/index.php?url={R:1}" appendQueryString="true" />

Category:php Views:0 Time:2011-07-22
Tags: php iis cakephp

Related post

  • Where should I place text that I'm trying to abstract in my CakePHP application? 2010-08-10

    I am writing a CakePHP application and am trying to have text that is frequently displayed (or particularly long) saved in a config file somewhere that we can easily edit it. Where should i put this file and how do I access it? I am also worried abou

  • Apache and Cakephp application 2010-12-18

    I am running into issues with cakephp application running with CentOs. I did not change any setting in the default config other than added a file under conf.d which content as : NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot /var/www/port

  • Using plugin built-in translations in a CakePHP application 2012-03-20

    I am using a couple of plugins in a CakePHP application that come with predefined translations in their Locale directories. However, despite I have set the language setting, messages from these plugins are not being translated. First question: can Ca

  • What is the best way to create a tableA HABTM tableA relationship for a CakePHP application? 2008-10-22

    I have the need to create the functionality to allow my registered users to associate themselves with other uses and create a family. My database tables look something like this: db.persons - (Bob, Jane, Timmy, etc) id name email db.persons_persons i

  • How to config. Linq DataContext (in Class Lib Proj) to use connection string in web.config of web application? 2009-04-03

    I'm looking for a solution on how to configure Linq DataContext in Class Library Project in order to use Connection String in web.config of web application. Your advice would be much appreciated. --------------Solutions------------- I am not sure if

  • Is it possible to use a WordPress session to authenticate to a CakePHP application? 2009-04-20

    What is the best way to use a successful WordPress sign-in attempt to authenticate to a CakePHP application? I don't want to use password synchronization, if at all possible. I'd prefer to keep all of the user details within the WordPress database ta

  • Where should I put CAS session checking code in a CakePHP application? 2009-07-31

    I work for a department of a university that uses CAS to provide single-sign-on authentication, and am writing a CakePHP application that needs to use this CAS service. I need to write code that: Checks with the CAS server to see if the user is logge

  • CakePHP application on a hosted server? 2009-11-12

    How do I run cakePHP application on a hosted server? I have created my own application in CakePHP. It was running fine locally. But when I upload it to server, it's gives a 404 Not Found Error. Can anybody tell me how to upload CakePHP to the hosted

  • CakePHP Application Deployment 2010-01-01

    I am interested in finding out how folks are deploying their CakePHP applications. I have recently been approached about doing some freelance CakePHP development, which would be a nice opportunity for me to get some experience in the presentation tie

  • How to monitor a CakePHP application 2010-02-20

    I would like to get a better insight into my CakePHP application. Ideally, the report would be similar to those generated by New Relic RPM - http://www.newrelic.com/. Are there any plugins or services that can deliver these sorts of reports for CakeP

  • Missing validation message in cakephp application 2010-07-22

    I'm trying to add a layout for a cakephp application but now my validation message is no longer being displayed. When validating a comment on a blog entry, the validation message thats suppose to be at the top is not displayed. --------------Solution

  • Inegration of wordpress in cakephp Application 2010-07-27

    how i can extend the cake-app-authentication, so that the user is automatically logged in to the wordpress blog --------------Solutions------------- Basically it's not plug&play for sure. First of all, your WP blog should be in the same domain as

  • Breakpoints are completely ignored when debugging CakePHP application 2010-10-20

    I'm developing in NetBeans a CakePHP application and finally managed to get it connecting to XAMPP debugging sessions (PHP 5.3.1 w/ Xdebug v2.0.6-dev). It perfectly works when launching, it does pause the application on the first line. However any fu

  • Is there a wiki system that can be easily "plugged-in" to an existing CakePHP application? 2010-10-22

    I'm looking for a wiki system, that can easily be incorporated into an existing CakePHP application. I would have done it seperately from the CakePHP application, but the buyer requests that the user authorisation is done from the same tables. ------

  • Configuration in Web.config to run application in a IIS 7+ classic mode 2011-05-13

    Is there any way that I can config in my web.config if customer is using IIS 7+ the application should run in a classic mode. Thanx --------------Solutions------------- This setting you can't be able to change through your application's web.config. A

  • How to add custom layout and css in a CakePHP application? 2011-05-22

    I'm about to begin developing a CakePHP application, I understand CakePHP is aimed at allowing developers to put a web application together as quickly as possible hence it comes with default CSS and layouts for the views. How would I go about replaci

  • How to connect CakePHP application to Drupal Site? 2011-10-05

    How to connect CakePHP application to Drupal Site Database, AND via RSS generated from Drupal site? Edit: let's say just connect via RSS generated from a Drupal site --------------Solutions------------- mmmm unfortunately there is no project in drupa

  • Make licence to cakePHP application? 2012-02-08

    I have create one application in cakePHP for 1 client. Now I want to encrypt that code because I don't want client to distribute the code for others. But which file I should encrypt because cakePHP is open source any file which I will encrypt client

  • Automatically running an unrelated action in cakePHP application 2012-02-14

    I am working on a small application to provide quotes for custom products. It's my first cakePHP application. Many of the fields for the products are calculated automatically when a product is added or saved. The calculations use valuse stored in the

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.113 (s). 11 q(s)