Optimization For Customer >> SEO experience >> Google Rank Tips: Dynamic web site optimization

Google Rank Tips: Dynamic web site optimization

Optimization For Customer 2009-11-10 11:31:26
Static Dynamic Website processing: general internal Web site commonly used methods are replaced by a set of background is dynamic, static front page is an automatically generated system, such systems have been very large, you may need to go according to your website choice, or specifically asked people to develop. Abroad, are generally used in the current URL is the following mapping methods: (There are two kinds of implementations)

Based on url rewrite IIS's ISAPI REWRITL

based on the path info as a parameter to URL address: URL REWRITE

The simplest is based on a variety of WEB server URL rewriting turned (Rewrite) module URL conversion: These almost do not modify the program to achieve an news.asp? id = 234 This connection mapped news/234.html, and static links from the outside looks like, Apache server, there is a module (non-default): mod_rewrite: URL REWRITE function of the strength enough to write a book.

When I need to news.asp? id = 234 mapped news/234.html, simply set:

RewriteRule / news / (\ d +) \. html / news \. asp \? id = $ 1 [N, I], so put / news/234.htm such Request mapped into / news? id = 234.

In the IIS is also a corresponding REWRITE module: for example, ISAPI REWRITE and IIS REWRITE, grammar are based on the correct expression, because the configuration is almost apache's mod_rewrite is the same:

than one simple application can be: RewriteRule / news / (\ d +) \. html / news / news \. php \? id = $ 1 [N, I], Which brings http://www.chedong.com/news/234.htm mapped to the http://www.chedong, .com / news / news.php? id = 234

A more common to all of the dynamic page parameter mapping expression is:

the performance of the http://www.myhost.com/fpp.php?a=A&b=B&c=C into http://www.myhost.com/ foo.php / a / A / b / B / c / C

RewriteRule (.*? \. Php) (\ ?[^/]*)?/([^/]*)/([^/]*)(.+?)?$ 1 (? 2 $ 2 &: \ ?) $ 3 = 4? 5 $ 5: [N, I]

The following is an Apache mod_rewrite for phpBB with sample:

RewriteEngine On

RewriteRule / forum / topic_ (. +) \. html $ / forum / viewtopic.php? t = $ 1 [L]

RewriteRule / forum / forum_ (. +) \. html $ / forum / viewtopic.php? t = $ 1 [L]

RewriteRule / forum / user_ (. +) \. html $ / forum / profile.php? mode = viewprofile & u = $ 1 [ L]

This setting can, through topic_1234.html forum_2.htm user_34.htm this link to access the dynamic pages of the original.

through the URL REWRITE there are some advantages:

Mod_rewrite and isapirewrite basic compatibility, but it is still somewhat different, for example: isapirewrite the "?" need to escape into the "\?", mod_rewrite do not, isapirewrite support "d +" (all digital ), mod_rewrite does not support the hidden background of reality: This is in the background application platform is very useful when the migration: When migrating from ASP to JAVA platform for future users, simply do not feel the changes in back-office applications;

simplifies data validation: This is because, as (\ d +) so the parameters can effectively control the number of formats and even digits;

For instance, we need to be applied from the news.asp? id = 234 to migrate into news.php? query = 234, the front desk's performance will be maintained as a news/234.html. From the front to achieve the performance of applications and the separation of: to maintain the stability of the URL, while the use of mod_rewrite can even forward the request to the other back-office servers.

based on the PATH - INFO's URL landscaping

URL beautify Another way is based on URL_INFO:

PATH_INFO is the CGI standard, PHP Servlet and others have their support. For example, there Servlet in request.getPathInfo () method.

Note: / hello.jsp, from here you can also know the JSP is actually a Servlet the PATH_INFO parameter. ASP does not support PATH_INFO, php parameters based on PATH_INFO parsing examples are:

/ / Note: The argument by "/" partition, the first parameter is empty: From / param1/param2 the parse out the $ param1 $ param2 these two parameters if (isset ( $ _SERVER [ "PATH_INFO "])){

?? list ($ nothing, $ param1, $ param2) = explode ("/",$_ SERVER [ "PATH_INFO "]);}

How to Hide Application: For example:. Php extension:

In the APACHE in this configuration:



?? ForceType application / x-httpd-php



How do I like static pages: app_name / my / app.html

PATH_INFO parsing parameters when a parameter for the final the last 5 characters ". Html" cut can be.

Especially with regard to the use of virtual host users, has no right to install and configure mod_rewrite time, PATH_INFO often become the only option.

OK, so after seeing this website is similar to http://www.example.com/article/234 you know might be article / show.php? Id = 234 The program generates PHP dynamic web pages, many sites appear to be There are many static directories, in fact, are most likely to use 1,2-a content distribution program implementation. For example, many WIKIWIKI systems use this mechanism: The entire system is a simple WIKI procedures, and the directory are in fact look to take back the address of this application as a parameter of the query results.

To use based on MOD_REWRITE / PATH_INFO + CACHE server solutions for the original dynamic publishing system to reform, but also can significantly reduce the old system to upgrade to a new content management system costs. And facilitate the search engine included traction.

Attachment: How to use PHP on IIS to support PATH_INFO

PHP in ISAPI mode installation Memo: only test into php-4.2.3-win32

Unpack directory

Php-4.2.3-win32.zip c: \ php

PHP.INI initialization files

Copy: c: \ php \ php.ini-dist to c: \ winnt \ php.ini

Configuration file associated with

In accordance with the instructions in install.txt configuration files associated with

Run-time files

Copy c: \ php \ php4ts.dll to c: \ winnt \ system32 \ php4ts.dll

Running this way: find php the PATH_INFO is mapped to a physical path

Warning: Unknown (C: \ CheDong \ Downloads \ ariadne \ www \ test.php \ path): failed to create strem: No such file or directory in Unknown on line 0

Warning: Unknown (): Failed opening 'C: \ chedong \ downloads \ ariadne \ www \ test.php \ path' for inclusion (include_path = '.; C: \ php \ pear') in Unknown in line 0

Install ariadne's PATCH

Stop IIS services

Net stop iisadmin

ftp://ftp.muze.nl/pub/ariadne/win/iis/php-4.2.3/php4isapi.dll

Covered by the original c: \ php \ sapi \ php4ispi.dll

Note: ariadne is based on PATH_INFP content publishing system, PHP4.3.2RC2 the PATH_INFO in CGI mode has been amended to install as usual can be.
????????????????????
Search Engine Optimization and Marketing,for SEOer,SEMer,Webmaster and Web designer | | email:absee8#gmail.com