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