Run the cake application on the Windows Azure Web site

Source: Internet
Author: User
Tags config iis

Cake is a rapid development framework that utilizes well-known design patterns such as ActiveRecord, association Data Mapping, Front Controller, and MVC. The main goal of the project is to provide a variety of levels of PHP developers to quickly develop robust web applications without losing flexibility.

To use the cake on Windows Azure:

Download Cake 2.2.1

Unzip the downloaded compressed package

Publish to Windows Azure Web site

Upload files via FTP to Windows Azure or;

Use Git to publish Windows Azure Web site applications

Build the Application

I'm using the cake Blog Tutorial to test the functionality

Cake on IIS (aka Windows Azure Web Sites)

Note that Windows Azure uses IIS to run the cake application, so a web.config is needed to describe the application because IIS does not support. htaccess files.

The following is an example of a web.config on the cake Web site to run the cake application on the Windows Azure Web site:

<?xml version= "1.0" encoding= "UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name= "imported rule 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"/>
</conditions>

<action type= "Rewrite" Url= "index.php?url={r:1}" appendquerystring= "true"/>

</rule>

<rule name= "imported rule 2" stopprocessing= "true" >
<match url= "^$" ignorecase= "false"/>
<action type= "Rewrite" url= "/"/>
</rule>
<rule name= "imported Rule 3" stopprocessing= "true" >
<match url= "(. *)" ignorecase= "false"/>
<action type= "Rewrite" Url= "/{r:1}"/>
</rule>
<rule name= "imported rule 4" 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"/>
</conditions>
<action type= "Rewrite" Url= "index.php/{r:1}" appendquerystring= "true"/>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.