method

631Currently online
118Today's Reading
42Share Today
Multilingual display

IIS 6.0 and APACHE 301 redirection Settings

2018-05-13 09:36:41

There are two common 301 redirect Settings that I know of. One is set directly through the IIS interface, and the other is to implement 301 redirection Settings through code. It is recommended to use the server component to do the redirection, the following example to explain in detail. 1: IIS server to achieve 301 redirect without WWW to domain names with WWW Actual method: Open IIS, right-click - properties - website -IP address where to edit add a site, add a site, bind the next host header, can also bind multiple idle domain names. To open IIS as shown in the figure, first create a site that corresponds to any directory E: wwwrootAweb. You only need 2 files in this directory, one default.html and one 404.htm. Right-click the page or directory you want to redirect; Select "Redirect to URL"; Enter the address of the target page in the dialog box; Remember, remember to select "Permanent redirect"; Finally, of course, click "Apply" and you're done. As shown in the following figure: 2: The Apache server implements 301 redirection to the domain name with WWW. Add 301 redirection instruction to the.htaccess file using "mod_rewrite" technology, such as: RewriteEngine OnRewriteCond %{http_host} ^58019.com [NC]RewriteRule ^(.*)$

Recommendation