BAE3.0 Multi-site app.conf file configuration method

Source: Internet
Author: User
Tags codeigniter

Today put 3 sites, one of the CodeIgniter site, and two wordpres sites, all moved to a domain name below, but also quite a lot of trouble, recently always like toss!

First, these three sites now have domain names:

http://your domain name (WordPress)

http://your domain/tanteng/(wordpress)

http://your domain/hongzhiban/(CodeIgniter)


If not in the BAE3.0 environment, the other site directly moved over, the database table put together a common database, and then change the database connection configuration, basically OK.

But in the BAE3.0 environment, folder, routing, file path how to distinguish it? You will not only configure routing rules, but also let Bae know which is the folder.

Now the complete app.conf file:

Handlers:
-expire:. jpg Modify Years
-Expire:. SWF Modify Years
-Expire:. PNG Modify Years
-Expire:. gif modify Years
-Expire:. JPG Modify Years
-Expire: ICO modify years
-URL: (. *). css$
Script: $1.css
-URL: (. *). js$
Script: $1.js
-URL: (. *). jpg$
Script: $1.jpg
-URL: (. *). gif$
Script: $1.gif
-URL: (. *). png$
Script: $1.png
-URL: (. *). jpeg$
Script: $1.jpeg
-URL: (. *). php$
Script: $1.php
-URL: (. *). html$
Script: $1.html
-URL: (. *). xml$
Script: $1.xml
-URL: (. *). txt$
Script: $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-includes/$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, a problem was found:
http://your domain/author/tanteng/author page is not open, but http://your domain/tanteng/article/author/tanteng9/The author page can be opened.

Take a closer look at the app.conf file, the original http://your domain name/author/tanteng/the name of the author and http://your name/tanteng/the site, so the previous site is mistaken for the following route, So forward to the back of the site index.php went.

Then make a change, after several tests, to write this:

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

Also pay attention to the order, the front will cover the back, so your domain name complete the correct app.conf configuration is as follows:

Handlers:
-expire:. jpg Modify Years
-Expire:. SWF Modify Years
-Expire:. PNG Modify Years
-Expire:. gif modify Years
-Expire:. JPG Modify Years
-Expire: ICO modify years
-URL: (. *). css$
Script: $1.css
-URL: (. *). js$
Script: $1.js
-URL: (. *). jpg$
Script: $1.jpg
-URL: (. *). gif$
Script: $1.gif
-URL: (. *). png$
Script: $1.png
-URL: (. *). jpeg$
Script: $1.jpeg
-URL: (. *). php$
Script: $1.php
-URL: (. *). html$
Script: $1.html
-URL: (. *). xml$
Script: $1.xml
-URL: (. *). txt$
Script: $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-includes/$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.