Search Engine Friendly URL Design
http://www.lelew.com/
In addition, as the content on the Internet is increasingly highlighting the importance of search engines, if the website wants to be better subject to search engines, the website design is for user friendly (user friendly), search engine friendly The design of Search Engine Friendly is also very important. The more the page you enter the search engine, the greater the chance to find by the user with different keywords. In a Google's Algorithm Investigation, a site mentioned by a Site is also affected by the number of Google Indexes. It is also impact on PageRank. Since Google highlights the relatively static part of the entire network (the dynamic web index quantity is relatively small), the link address is relatively fixed, the static web page is more suitable for the Google index (noble, the mail list archive and blog of the big website "and Blog are archived by date. Since then it is, therefore, many of the forms of using a certain mechanism into a static web page in a statement for the search engine URL design optimization (URI PRETTY): such as: http: // www .chedong.com / phpman.php? mode = man & parameter = LS becomes: http://www.chedong.com/phpman.php/man/ls implementation mode mainly 2:
ISAPI REWRIIS Based on PATH_INFO Based on PATH_INFO to pass the URI address as a parameter transmission: URL REWRITE is the simplest based on the URL converted steering (REWRITE) module in a variety of web servers: This is almost not modified The link of the program will be mapped into news / 234.html, which looks like the static link from the outside. There is a module on the Apache server (non-default): MOD_REWRITE: URL REWRITE function is strong enough to write a book. When I need to map the news.asp? Id = 234 into news / 234.html, just set: shutriterule /news/(/d )/.html /news/.asp/?id= $ 1 [N, I] This will map the request such as /news/234.html into /news.asp?id=234 When there is a request for /news/234.html: The web server forwards the actual request to /news.asp • ID = 234 also has corresponding REWRITE modules in IIS: such as Isapi Rewrite and IIS Rewrite, syntax is based on regular expressions, so configuring almost the same and apache's mod_rewrite is the same: REWRITERULE / NEWS / (/ D ) /. html /news/news/.php/?id= $ 1 [n, i] This will map http://www.chedong.com/news/234.html to http: // Www.chedong.com/news/news.php?id=234 A more common expression of all dynamic pages is mapped in http://www.myhost.com/foo.php?a= A & B = B & C = C behaves to http://www.myhost.com/foo.php/a/a/b/b/c/c. ReWriterule (. *? /. PHP) (/? [^ /] *) / ([^ /] *) (. ?)? $ 1 (? 2 $ 2 &: /? $ 3 = $ 4? 5 $ 5: [N, I] There are also some benefits through the URL Rewrite:
Hide background implementation: This is very useful when migrating in the background application platform: When moving from ASP to the Java platform, for the front desk users, the fundamental feelings do not change the background application; simplify the data check: Because of the image (/ d ) Such parameters can effectively control digital formats or even numbers; for example, when we need to migrate applications from News.asp? Query = 234, the performance of the foreground can remain in NEWS / 234. HTML. Separation from the application and front desk: Maintain the stability of the URL, and use mod_rewrite can even forward the request to other background servers. Another way to beautify the URL landscaping based on PATH_INFO is based on PATH_INFO: Path_info is a CGI 1.1 standard, often discovered that "/ value_1 / value_2" following the CGI "is the PATH_INFO parameter: such as http://www.chedong. COM / PHPMAN.PHP / MAN / LS, medium: $ PATH_INFO = "/ man / ls" path_info is the CGI standard, so PHP servlet is supported. For example, there is a request.getpathinfo () method in the servlet. Note: / myapp / servlet / hello / foo getPathInfo () returned / foo, / foo, and /myapp/dir/hello.jsp/foo getPathInfo () will return /HELLO.JSP, from here you can also know JSP In fact, it is a servlet's path_info parameter. ASP does not support Path_info, PHP-based parameter-based parameters based on PATH_INFO-based parameters are as follows: // Note: Parameters Press "/" Split, the first parameter is empty: from / param1 / param2 to extract $ Param1 $ param2 2 Parameter IF (ISSET ($ _ Server ["Path_info"])) {list ($ Nothing, $ Param1, $ Param2) = EXPLODE ('/', $ _server ["path_info"]);} How to hide applications: For example .php , Extended in Apache:
The original dynamic distribution system is used to modify the original dynamic distribution system using a solution based on mod_rewrite / path_info cache servers. It can greatly reduce the cost of upgrading the old system to the new content management system. It is convenient for the search engine to enter the index. Attach: How to use PHP to support Path_infophp on IIS, ISAPI mode installation memo: only to PHP-4.2.3-Win32 unpacking directory ======== php-4.2.3-win32.zip C: / PHPPHP.INI initialization file ================= Copy: c: /php/php.ini-dist to c: /winnt/php.ini configuration file association ==== ======== Follow the instructions in install.txt =========== C: / php/php4tsts.dll to C: / WinNT / System32 / PHP4TS. After the DLL is running: will find PHP to map PATH_INFO to the physical path WARNING: unknown (c: /cheddong/downloads/ariadne/www/test.php/path): failed to create stream: no resch file or directory in unknown on Line 0warning: unknown (): failed openings/riadne/www/test.php/path 'for inclusion (include_path =' .; c: / php4 / pear ') in unknown on line 0 Install Ariadne PATCH ================== Stop IIS service NET Stop iisadminftp: //ftp.muze.nl/pub/ariadne/win/iis/php-4.2.3/php4isapi .dll overwrites the original C: /PHP /SAPI/PHP4isapi.dll Note: AriaDne is a PATH_INFO-based content publishing system, PHP 4.3.2 Path_info's PATH_INFO has been corrected, ready to install. Reference: URL REWRITE Document: Isapi Rewrite Document IIS ISAPI REWRITE Download (free) http://httpd.apache.org/docs/mod/mod_rewrite.htmlhttp://httpd.apache.org/docs-2.0/mod/ MOD_REWRITE.HTML Search Engine Friendly URL Design http://www.sitepoint.com/Article/485 Maybe this URL is originally Articel.php? id = 485 A PATH_INFO open source content management system http://Typo3.com / Google PageRank Algorithm Description: http://pr.efactory.de/