On the PHP server, how does one set the default version? Just like SAE

Source: Internet
Author: User
As shown in. I want to do the same in server development. For example, if I have done so now, after I have completed version 1, let the Client Access: www. myapp. com1 and then I create a new version named 2 in svn. after 2, the client becomes www. myapp. com2. in this case, the service...

As shown in. I want to do the same in server development. For example, if I have done so now, after I have completed version 1, let the Client Access: www.myapp.com/1.
Then I created a new version named 2 in svn. After the version was completed, the client was changed to a new version like www.myapp.com/2.. the client was changed to a new version, and the old client data installed by the former user was no longer compatible.
May I ask if I can use the same SAE as I set the default version to 2? When I access myweb.sinaapp.com, I actually access 2.myweb.sinaapp.com. if I change it to 1, it will be 1.myweb.sinaapp.com.
My current server location is www.myapp.com, And the backend only needs to be set like sae, assuming it is set to 2. In this way, when the client accesses www.myapp.com, it is actually accessing www.myapp.com/2.
How can I implement it. I do not know that directly using URL redirection does not work. Or is reverse proxy used?
I'm not talking about using SVN to manage versions, but how to jump to the default version.

Reply content:

As shown in. I want to do the same in server development. For example, if I have done so now, after I have completed version 1, let the Client Access: www.myapp.com/1.
Then I created a new version named 2 in svn. After the version was completed, the client was changed to a new version like www.myapp.com/2.. the client was changed to a new version, and the old client data installed by the former user was no longer compatible.
May I ask if I can use the same SAE as I set the default version to 2? When I access myweb.sinaapp.com, I actually access 2.myweb.sinaapp.com. if I change it to 1, it will be 1.myweb.sinaapp.com.
My current server location is www.myapp.com, And the backend only needs to be set like sae, assuming it is set to 2. In this way, when the client accesses www.myapp.com, it is actually accessing www.myapp.com/2.
How can I implement it. I do not know that directly using URL redirection does not work. Or is reverse proxy used?
I'm not talking about using SVN to manage versions, but how to jump to the default version.

How can I set the second-level directory binding?
Drag a new version 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.