How to configure the BAE3.0 multi-site app. conf file

Source: Internet
Author: User

Next let's take a look at the configuration method of the BAE3.0 multi-site app. conf file. You can refer to baidu for what bae is. There are bae of Sina and baidu.

Today, I moved all three websites, one of which was built by CodeIgniter and the other two wordpres, to the same domain name. It was a great deal of trouble. Recently, I always liked it!

First, the current domain names of the three websites are:

Http: // your domain name (wordpress)

Http: // your domain name/tanteng/(wordpress)

Http: // your domain name/hongzhiban/(CodeIgniter)


If it is not in the BAE3.0 environment, the other sites will be moved directly, the database tables will be put together to share the database, and then the database connection configuration will be changed, basically OK.

But in the BAE3.0 environment, how are the folders, routes, and file paths differentiated? You not only need to configure routing rules, but also let BAE know which folder is used.

Now the complete app. conf file is:

Handlers:
-Expire:. jpg modify 10 years
-Expire:. swf modify 10 years
-Expire:. png modify 10 years
-Expire:. gif modify 10 years
-Expire:. JPG modify 10 years
-Expire:. ico modify 10 years
-Url: (. * ).css $
Script: Rule 1.css
-Url: (. *). js $
Script: $ 1.js
-Url: (. * 2.16.jpg $
Script: JPG
-Url: (. * 2.16.gif $
Script: Example 1.gif
-Url: (. * 2.16.png $
Script: bytes 1.png
-Url: (. * 2.16.jpeg $
Script: bytes 1.jpeg
-Url: (. *). php $
Script: $ 1.php
-Url: (. * pai.html $
Script: Rule 1.html
-Url: (. *). xml $
Script: $ 1.xml
-Url: (. * cmd.txt $
Script: 255.1.txt
-Url: (. *). ico $
Script: $ 1.ico
-Url:/hongzhiban (.*)
Script:/hongzhiban/index. php
-Url:/tanteng/wp-admin/
Script:/tanteng/wp-admin/index. php
-Url:/tanteng/wp-includes /(.*)
Script:/tanteng/wp-DES/$1
-Url:/tanteng/wp-content /(.*)
Script:/tanteng/wp-content/$1
-Url:/tanteng (.*)
Script:/tanteng/index. php
-Url:/wp-admin/
Script:/wp-admin/index. php
-Url :(.*)
Script:/index. php

Later I found another problem:
Http: // your domain name/author/tanteng/author page cannot be opened, but the http: // your domain name/tanteng/article/author/tanteng9/author page can be opened.

Take a closer look at the app. conf file, the original http: // your domain name/author/tanteng/author name is the same as the following http: // your domain name/tanteng/site name, therefore, the preceding URL is mistakenly thought to be a route entry under the site, so it is forwarded to the index of the site. php went.

Then modify the file. After several tests, write as follows:

-Url:/article (.*)
Script:/tanteng/index. php
-Url:/author (.*)
Script:/index. php

In addition, pay attention to the order. The previous steps will overwrite the subsequent steps. Therefore, the correct app. conf configuration for your domain name is as follows:

Handlers:
-Expire:. jpg modify 10 years
-Expire:. swf modify 10 years
-Expire:. png modify 10 years
-Expire:. gif modify 10 years
-Expire:. JPG modify 10 years
-Expire:. ico modify 10 years
-Url: (. * ).css $
Script: Rule 1.css
-Url: (. *). js $
Script: $ 1.js
-Url: (. * 2.16.jpg $
Script: JPG
-Url: (. * 2.16.gif $
Script: Example 1.gif
-Url: (. * 2.16.png $
Script: bytes 1.png
-Url: (. * 2.16.jpeg $
Script: bytes 1.jpeg
-Url: (. *). php $
Script: $ 1.php
-Url: (. * pai.html $
Script: Rule 1.html
-Url: (. *). xml $
Script: $ 1.xml
-Url: (. * cmd.txt $
Script: 255.1.txt
-Url: (. *). ico $
Script: $ 1.ico
-Url:/hongzhiban (.*)
Script:/hongzhiban/index. php
-Url:/weibo (.*)
Script:/weibo/index.html
-Url:/tanteng/wp-admin/
Script:/tanteng/wp-admin/index. php
-Url:/tanteng/wp-includes /(.*)
Script:/tanteng/wp-DES/$1
-Url:/tanteng/wp-content /(.*)
Script:/tanteng/wp-content/$1
-Url:/article (.*)
Script:/tanteng/index. php
-Url:/author (.*)
Script:/index. php
-Url:/tanteng (.*)
Script:/tanteng/index. php
-Url:/wp-admin/
Script:/wp-admin/index. php
-Url :(.*)
Script:/index. php

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.