• Welcome to Auciou's Blog! Subscibe
  • HomeAbout AuciouArchivesContactSite MapLinks

  • Archives of January 2010

    Diary: 2010-01-15

    January 15, 2010 at 21:35

    Because the demostic and overseas Linux hosting do not support the mod_expires module, as http://www.auciou.com/peace/89, can not directly set the expiring time by the .htaccess for the picture files.

    After the tests, finally there was a helpless way instead, create a .htaccess file in the picture folder, may use the 404 error or Rewrite module. Make the 404 error or Rewrite point to a file auf.php, set the expiring time in this auf.php and use header("Expires:"), intercept the picture's file name from the Address Bar as $a1, use include() function to include the picture file, as include($a1). So, the include() function of PHP is powerful.

    The long-range picture also can use file_get_contents() function to invoke, write in the auf.php, also can set the expiring time of long-range picture, so the function of PHP is powerful.

    Permalink | Comments (0) | Trackback (0)

    Many Linux hostings do not support the mod_expires module

    January 15, 2010 at 21:03

    "mod_expires" is a very important module of Apache, but currently many Linux hostings do not support this module. Use the mod_expires module, may set the expiring time by the .htaccess for the picture files, Flash files, .js files, midi files, etc., make the site's speed faster, save a lot of traffic.

    My Linux space of IXWebHosting, the free hostings which GoDaddy presented to me, and a domestic Linux space, all of them do not support the mod_expires module. At present, the newer version of Apache is 2.2.*, such as 2.2.14, this version contains the mod_expires module, but the default does not turn on this module, in the default httpd.conf file, there is a # symbol before the sentence which loads the mod_expires module. But the Linux hosting of GoDaddy, use the Apache 1.3 version all the same.

    I posted an Email to GoDaddy yesterday, hope to turn on the mod_expires module, I've just received the reply of GoDaddy, they said that they do not want to turn on this module now, maybe this clerk did not know the important action of the mod_expires module. It seems that if need use the mod_expires module, just can use the others hosting of provider, or VPS.

    I've downloaded the Apache 2.2.14 version, tested on the local computer, the mod_expires module can be used normally.

    Permalink | Comments (3) | Trackback (1)

    Figured out, there is still a way

    January 15, 2010 at 04:51

    This article is just for the regular Blogs, for the compatriots who have conscience. This past month, I worried about the occurrence of Local Area Network of China, if unfortunately it comes, for Bloggers, there is still a way, the overseas hosting may still be used. If the IP is blocked, change a IP; if the domain of Blog "aaa.com" is blocked, then register a temporary domain bbb.com, use this domain name's sub domain http://aaa.bbb.com to parse the space of "aaa.com", use http://aaa.bbb.com to visit, because www.aaa.com will can't be visited.

    The fee of the primary domain aaa.com will be renewed all the same, until the Local Area Network ends. The Local Area Network is impossibly eternal, because it violates the morality and justice, it will be temporary. If you have many Blogs or sites, also may parse by the sub domain of that domain bbb.com, for domestic compatriots to visit, so as long as register a temporary doman. Because bbb.com is a temporary domain, when this domain is hung, may change to ccc.com.

    The Blog will not be dead, this rock may finally put down. The Blog can survive, more important than anything else.

    Permalink | Comments (0) | Trackback (0)

    About the delicated IP of IXWebHosting

    January 13, 2010 at 20:12

    The delicated IP of IXWebHosting makes us depressed for the users in China. The 3 plans of hosting present: 2, or 3, or 15 delicated IPs. It is gloomy that every delicated IP can just be used for one complete and delicated site, if use the .htaccess file to realise that one delicated IP to be binded for many sites, there will be a lots of mistakes, such as these site can not solely use the .htaccess file, can not realise that the URL becomes static.

    Apache creates a virtual hosting, that's to say creates a delicated site, the theory is that must create in the httpd.conf file. While the delicated IPs of IXWebHosting are used up, while create a domain it will use the shared IP. But the delicated IP of GoDaddy, all of the domains which were created, can use this delicated IP. If every site which were created in IXWebHosting, all of them can share this delicated IP, it will be perfect.

    A delicated IP of IXWebHosting can just create a delicated site, made a very big waste; a delicated IP of GoDaddy can create unlimited delicated sites. That means, if the shared IP of IXWebHosting is blocked by China, these 3 plans of hosting can just create 2, or 3, or 15 sites. So, these is no advantage of the delicated IP of IXWebHosting for the users in China.

    Permalink | Comments (1) | Trackback (0)

    About the QUERY_STRING parameter of URL

    January 13, 2010 at 04:56

    In these 7 years program experiences, I often used the QUERY_STRING parameter. The active page needed use this QUERY_STRING parameter largely, It is also called "query parameter". Such as article.asp?id=52, main.php?violate=respond&aware=52&retail=75, etc., the parameters after the question mark. There are many sites use many query parameter in the Address Bar, make the URL longer. Actually some are not necessary, and some are necessary. The unnecessary query parameter, just works for adorning the URL, these noneffective query parameters do not affect the run of program.

    The query parameters may reduce largely, such as the documents of Blog and forum. In a site, the approach of differentiating 2 articles is that as the URL above, article.asp?id=52 or article.php?id=495, differentiate by the ?id=. All of the other parameters, may write in the database or Cookies. Because Apache provides the .htaccess, the URL may use the Rewrite module or 404 error, realise that the URL becomes static. The query parameters may write in the database or Cookies, many necessary parameters write on the Address Bar by the connective symbols / or -.

    For the immovable links of documents, you may reduce the QUERY_STRING parameters as possible. For the active URLs of search or query which submited by the users, the QUERY_STRING parameters may write on the Address Bar.

    Permalink | Comments (0) | Trackback (0)

    About the ping value and speed of site

    January 11, 2010 at 21:41

    Actually, the influence of ping value on the speed of site is big. Compare with 2 hostings which a static page or a active page which without connecting the database, you may see the distinction. The fastest is 127.0.0.1 on the local computer, this ping value is less than 1 ms. There is a local site in my city which the ping value is between 18 ms and 21 ms, it almost catched up 127.0.0.1. My 2 domestic spaces, one is CNC server, another one is Telecom server, both the ping values are about 60 ms, the speed is very fast. My another space of server in Shanghai, the ping value is between 90 and more than 100 ms, the speed is slower than 60 ms.

    The ping values of my 2 spaces in the USA are about 250 ms, and about 280 ms, after many tests, the distinction between 250 ms and 280 ms is obvious. The speed of 250 ms, is almost the same as the domestic speed. The speed of 280 ms, is little slower, about 0.1 to 0.2 second.

    So, the ping value is really a factor which decides the speed of site.

    Permalink | Comments (0) | Trackback (0)

    The relation between program and .htaccess file

    January 10, 2010 at 21:59

    This is just a diary. Apache provides the powerful .htaccess file, actually it realises some of the functions of server configuration. The .htaccess file may write the regular expression, write the correlative commands, etc., these commands will be parsed by Apache, these commands' essential are that start the correlative background programs.

    The functions of .htaccess file which provides by Apache, may realise the special functions, such as make every files invoke the Rewrite module, mod_expires module, every folder appoints the 404 error page, etc.. These are PHP, JSP, Perl and the other none of any language of program may realise directly, because the .htaccess file just realises the functions of server configuration. Whereas, if need the more complicated judgement, the .htaccess file will need to cooperate with the program. As the previous example, http://www.auciou.com/peace/83, 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.

    All of the programs which use the Apache as the server background, such as PHP, may use the .htaccess file. ASP+IIS, or PHP+IIS, can not realise the functions of .htaccess file, because IIS does not support the .htaccess file.

    Permalink | Comments (0) | Trackback (0)

    Saved a delicated IP

    January 10, 2010 at 07:17

    Because IXWebHosting presents several IPs to us. I used one of the delicated IPs to parse unlimited sub domains' homepage and some inner pages (The different main domains and sub domains, used the same space, integrated them together); another delicated IP, used it to parse many domains' pan-domain. Finally, yesterday I merge the web pages of these 2 delicated IPs, via a judgment sentence, use a delicated IP to realise that many sub domains of different domains' resolution, and pan-domain resolution. After the tests of local and server, the program ran normally.

    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.

    Permalink | Comments (1) | Trackback (1)

  • Auciou: Programmer

    Peaceful Seabed | My column

    Category:
    Program | Internet | Computer
    Blog Research | PHP | Philosophy


    TDNote | Gratitude | Matnue | Aucist | Aroat | Aufirm | IXNes | Anydiary | Cersta | Coumit | Tovate | Aroat | Aucist | Matnue | Sinvide | Serble | Auciou's column | Peaceful Seabed | Webshu | Sail every day | Sail every day

    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


  • Copyright © 2007-2025 auciou.com All rights reserved.
    Programmed by Auciou.