Auciou posted on January 10, 2010 at 07:17
So it saved a delicated IP, from now on if I change the provider of hosting, I may just buy a delicated IP, and need not buy 2 delicated IPs. My approach is that the sub domains and pan-domains point to this delicated IP, the control panel of site need not any setting, at the root directory of the corresponding space of this delicated IP, create a index.php file, use this PHP file to read the Address Bar, then use the include() function to include the homepage file of the corresponding sub domain or pan-domain. The prior order of include() is that judge whether the homepage file exists, if exists, it will include the homepage file of sub domain; if does not exist, it will include the homepage file of pan-domain.
All of the inner pages of this delicated IP, just can use the 404 Error of .htaccess to realise. Create a .htaccess file at the root directory of this delicated IP's space, let the 404 error point to the auf.php. As the same steps above, the error page auf.php also write the judgment sentence, use the include() function to include the inner page of the corresponding sub domain or pan-domain, the prior order and judgement method are same with above.
Employ this delicated IP to create many sites, such as the resolution of sub domain or pan-domain, these many sites are integrated together, can not realise all kinds of function as the delicated site. If need realise the functions of delicated site, you may use other approach, such as submit the functions to the delicated site to run, or create a sub domain or pan-domain on this delicated IP, make it can perform the corresponding function.
Use the .htaccess file to combine with PHP program, the .htaccess file appoints the 404 error page, it selects many 404 error page via the judgement of PHP program.
Category:
Program | Internet | Computer
Blog Research | PHP | Philosophy
Archives:
January 2011 | January 2010
December 2009 | October 2009 | September 2009 | April 2009
December 2008 | November 2008
May 2007 | April 2007
August 2005 | July 2005 | June 2005
May 2005 | April 2005 | March 2005
February 2005 | January 2005
Recent articles:
My Go Daddy hosting is fast
Create a house with your spouse on the interest
Pending time which add a domain of hosting, was more than 36 hours
Diary: 2010-01-15
Many Linux hostings do not support the mod_expires module
Figured out, there is still a way
About the delicated IP of IXWebHosting
About the QUERY_STRING parameter of URL
About the ping value and speed of site
The relation between program and .htaccess file
Saved a delicated IP
Judge that does a long-range file exist in PHP
How to call the Confederation of Planets and the high evolving beings of alien/pray/make a wish
Use Apache as the local virtual hosting to preview the Blog
Create the development environment of Apache
Reinstall Apache and PHP for one step
The elements of program of preventing the spam and closing IP
How to close the visit log of ixwebhosting
Happy Wedding to a friend
Make an easy Audio/Video converter