How does the PHP server set the default version? Just like SAE.

Source: Internet
Author: User
Tags php server subdomain

As shown in. I would like to do this in server development, for example, now I do, when my 1 version is done, let the client access: WWW.MYAPP.COM/1
And then I'm creating a new version of SVN called 2. When the 2 is good, the result turns the client into WWW.MYAPP.COM/2. In this case the server upgrade once, the client will change once, the previous user installed old client data will not be compatible.
Can I be like the SAE, for example I will set the default version to 2. Then when you visit myweb.sinaapp.com, you actually visit 2.myweb.sinaapp.com, instead of 1, it's 1.myweb.sinaapp.com.
I now assume that the server location is www.myapp.com, the background only need to be like the SAE set, assuming the setting of 2. In this way, when the client accesses www.myapp.com, it is actually the WWW.MYAPP.COM/2 of the visit.
How do I do that. Do not know the direct use of the URL jump does not work. Or do you use a reverse proxy?
I'm not talking about using the SVN admin version, but how to jump to the default version.

Reply content:

As shown in. I would like to do this in server development, for example, now I do, when my 1 version is done, let the client access: WWW.MYAPP.COM/1
And then I'm creating a new version of SVN called 2. When the 2 is good, the result turns the client into WWW.MYAPP.COM/2. In this case the server upgrade once, the client will change once, the previous user installed old client data will not be compatible.
Can I be like the SAE, for example I will set the default version to 2. Then when you visit myweb.sinaapp.com, you actually visit 2.myweb.sinaapp.com, instead of 1, it's 1.myweb.sinaapp.com.
I now assume that the server location is www.myapp.com, the background only need to be like the SAE set, assuming the setting of 2. In this way, when the client accesses www.myapp.com, it is actually the WWW.MYAPP.COM/2 of the visit.
How do I do that. Do not know the direct use of the URL jump does not work. Or do you use a reverse proxy?
I'm not talking about using the SVN admin version, but how to jump to the default version.

Set level two directory binding try?
For each new version, drag it to a subdirectory.
This is nginx.

set $subdomain '';        if ( $host ~* "(?:(\w+\.){0,})(\b(?!www\b)\w+)\.\b(?!(com|org|gov|net|cn)\b)\w+\.[a-zA-Z]+" ) { set $subdomain "/$2"; }        root  /home/wwwroot/ixiqin.com/web$subdomain;
  • 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.