for pseudo-static applications

Source: Internet
Author: User



I. Use of pseudo-static

SomeUserI think that the amount of pseudo-static and real-static files actually indexed is quite different. Otherwise, from your personal perspective, do you determine whether a post is real static or pseudo-static? It is hard to see, because the so-called static means that the address does not contain question marks, but static means. Is it true or false? Can the search engine see it? Therefore, whether it is true or false, it is the same for the search engine. The search engine did not say that you are false. I will not include you.

Why does the search engine not include websites with question marks? Because the search engine is afraid of entering an endless loop due to question marks, it is called the "spidertraps" (previously, the spidertraps had such a vulnerability on the Internet, and the spider went in and crashed ), therefore, the address search engine with question marks is not used in many cases. pseudo-static search engines are actually static because the address does not contain question marks, therefore, there is no more true or static data than pseudo static data.

2. Why do I select pseudo-static?

Many users say: Is it really static? Why not use static data? Isn't access faster? Isn't the load better? And so on ......

Here, we only use one question to answer: Why MySQL? Many users may not understand why MySQL databases have been used as a storage mechanism in many large forums. Most of them all think: "Because DZ uses MySQL, It is mysql ".

In fact, why did DZ go on so many forums?ProgramThe reason why DZ uses MySQL. Imagine if the program modified by Big C was a text forum, would there be a DZ today? Or from another perspective, why do so many large websites choose MySQL instead of text as the storage mechanism?

The so-called text forum is similar to the real static statement. It stores data in space, reads and writes a large number of hard disks, and so on ......

Why is this writing method obsolete? I believe the answer is not what the teacher said: "discuz! There are currently 2129867 posts, and the size of HTML stored is about 20799 MB, that is, about 20 GB. This does not count the space waste caused by the disk storage mechanism (the space occupied by 100 1 K files may be 200 K )."

From my personal point of view, this reason cannot be used by users for reasons that are not true or static. However, another reason is worth thinking about, that is why most sites do not choose to generate static data:

"Deleting and updating these HTML content will lead to a large number of disk Io operations and a large number of disk fragments ."

As mentioned above, in practice, a large number of disk I/O operations (input/output) and a large number of I/O operations can be imagined, A large number of disk fragments may even cause bad sectors on the hard disk.

Therefore, for static generation, it is better to use text forums to better address your needs. (Vice W was born from a text Forum. At that time, the name was ofStar, which was converted to MySQL due to development difficulties, PW generates static pages, that is, the original PW text method, which is slightly improved to attract users' attention)

Of course, if you have a good memory, you can remember that during pw4, the PW forum could not be accessed for a long time, and the data was recovered some time ago, the official statement is that the hard disk is damaged due to attacks. In fact, this statement is not credible. As a result, the hard disk is damaged due to attacks or a large number of I/O operations, I personally prefer the latter.

Of course, if you are more concerned about 5d6d, you should know that 5d6d was inaccessible one day a few days ago. According to unofficial news, the hard disk was broken, the reason for the damage is that a large number of users perform a large number of I/O operations. Imagine that in our forum, disk I/O operations are performed only when the administrator updates the cache, every member in 5d6d is an administrator. How big is the test of the disk? So I am not surprised that the 5d6d hard disk is broken.

Of course, you may be reading this articleArticleMany of my friends have used BT, and I have heard that Bt is very harmful to the hard disk and cannot be opened much. The so-called Damage refers to the same thing as what we refer to here, A large number of I/O results in disk fragments and even bad sectors.

Here are some practical examples to illustrate the problem.

Iii. disadvantages of pseudo-static

Of course, as the author of an article said: "if the traffic is slightly larger, the use of pseudo-static resources will overload the CPU usage, and more than 300 concurrent online users will be suspended, when no pseudo-static data is used, more than 500 online users are not suspended at the same time. My number of ISS instances is 1000."

This is true. Because the pseudo-static mode uses regular expressions instead of real addresses, the responsibility for determining which page is displayed is determined by the CPU directly. Therefore, the CPU usage increases, it is indeed the biggest drawback of pseudo-static.

4. Should we choose pseudo static or real static?

Let's summarize:

1. There is no difference between real static and false static for Seo.
2. Using true or static data may damage the hard disk and affect the Forum performance.
3. Using pseudo-static data will occupy a certain amount of CPU usage, and a large amount of use will overload the CPU.
4. The most important thing is that we need static resources for Seo.

1. You can use the true or static method to eliminate it directly, because no matter how it is generated, it is very bad for the hard disk.
2. Since the authenticity and static effect are the same, we can choose pseudo static.
3. However, a large amount of pseudo-static resources will overload the CPU.
4. As long as we do not need to use it in large quantities.
5. Since static content is just for Seo, we only need to give it to Seo through pseudo static content and do not need it for users.
6. Therefore, we only need to use pseudo static data in the archiver dedicated to Seo crawling.
7. Thank you for your patience in reading my article.
8. Do you have any questions or different opinions.

5. Comments on pseudo-static and real-static

Real static and pseudo static are essentially different. For browser users to process a pure htm and a PHP that calls multiple data, the former is significantly less in terms of CPU usage. I remember someone who said that HTML hard drives were frequently downloaded and read/written. He said that it seems that the database does not need to be read or written to the disk. Besides, there are a lot of scattered PHP cache files on the hard disk, do these reads require no disk operations? Ridiculous.

Read a single HTM + image flash and other attachments, why do I have to read the database, read the PHP cache file, re-integrate the data output, and add attachments such as image flash? The CMS homepage does not require a lot of interaction. The forum should not be used here. On the contrary, you should consider more: Beautiful! Compatible! Intuitive information! Performance! Stability!







In fact, the so-called pseudo-static page refers to URL rewriting, which is very simple to implement in ASP. NET.
First, you need to reference two DLL files in your project:
Actionlessform. dll
Urlrewriter. dll
Which of the following is true?Urlrewriter. dll, but if you want to implement paging, you must use this actionlessform. dll
First, write in Web. config


< Configsections >
< Section Name = "Rewriterconfig" Type = "Urlrewriter. config. rewriterconfigserializersectionhandler, urlrewriter" />
</ Configsections >
< Httpmodules >
< Add Type = "Urlrewriter. modulerewriter, urlrewriter" Name = "Modulerewriter" />
</ Httpmodules >
<! -- The following describes how to configure rewrite URL rules. -->
< Rewriterconfig >
< Rules >
< Rewriterrule >
< Lookfor > ~ /Products/jurisdiction _ (\ W {3}) \. aspx </ Lookfor >
< Sendto > ~ /En/jurisdiction. aspx? Jurid = $1 </ Sendto >
</ Rewriterrule >

< Rewriterrule >
< Lookfor > ~ /Articles/(\ D {1,}) \. aspx </ Lookfor > <! -- This is the replaced file name, using a regular expression -->
< Sendto > <! [CDATA [ ~ /En/article_view.aspx? Article_id = $1 ]> </ Sendto > <! -- This is a webpage to be replaced. It is generally a webpage with parameters following a question mark. -->
</ Rewriterrule >
< Rewriterrule >
< Lookfor > ~ /Articles/(\ D {1,}) _ (\ D {1,}) \. aspx </ Lookfor >
< Sendto > <! [CDATA [ ~ /En/article_view.aspx? Article_id = $1 & page = $2 ]> </ Sendto >
</ Rewriterrule >
</ Rules >
</ Rewriterconfig >

For example, the above URL http: // localhost/en/article_view.aspx? You can use http: // localhost/articles/9. aspx can be replaced. Of course, you can replace the extension with any extension that can be interpreted by IIS. If you prefer to use HTM as the extension, configure HTM as the extension above the forwarding rule, some articles may also be very long. We usually divide an article into several pages. Based on the above configuration, if we want to access http: // localhost/en/article_view.aspx? Article_id = 9 & page = 3 we can use http: // localhost/articles/9_3.aspx instead, so that when the search engine grabs your webpage, you will be included in these URLs. When someone else searches your webpage, they will be able to access these URLs.

Then, perform the following operations:
Right-click my computer --> Manage --> Expand 'services and Applications' --> Internet Information Service --> Find the directory you shared --> right-click Properties --> click 'configuration' -->
Ing the following --> Find. aspx executable file path copy path --> paste path --> the extension is ". html "--> then remove the check object check box to check whether the object exists.

Related Article

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: 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.