par
xTG » 02 mars 2012, 09:51
Personne, à ma connaissance, dans les habitués de ce forum ne travaille sous IIS.
Je t'ai trouvé cela sur le sujet :
web.config 301 redirect
The first example will redirect single pages to a new location. For example, important pages of your site have .htm extensions and you want the new location to be its own directory (IE.
http://domain.com/services.htm will change to
http://domain.com/services/).
1. Open web.config in the directory where the old pages reside
2. Then add code for the old location path and new destination as follows:
Code : Tout sélectionner
<configuration>
<location path="services.htm">
<system.webServer>
<httpRedirect enabled="true" destination="http://domain.com/services" httpResponseStatus="Permanent" />
</system.webServer>
</location>
<location path="products.htm">
<system.webServer>
<httpRedirect enabled="true" destination="http://domain.com/products" httpResponseStatus="Permanent" />
</system.webServer>
</location>
</configuration>
You may add as many location paths as necessary.
The second example will redirect an entire directory to a new location. For example, if you want
http://domain.com/olddir/ redirected to
http://domain.com/newdir/ open web.config in /olddir and add the following line of code within the <system.webServer> section:
<httpRedirect enabled="true" destination="
http://domain.com/newdir" httpResponseStatus="Permanent" />
http://knowledge.freshpromo.ca/seo-tool ... direct.php
Personne, à ma connaissance, dans les habitués de ce forum ne travaille sous IIS.
Je t'ai trouvé cela sur le sujet :
[quote]web.config 301 redirect
The first example will redirect single pages to a new location. For example, important pages of your site have .htm extensions and you want the new location to be its own directory (IE. http://domain.com/services.htm will change to http://domain.com/services/).
1. Open web.config in the directory where the old pages reside
2. Then add code for the old location path and new destination as follows:
[code]<configuration>
<location path="services.htm">
<system.webServer>
<httpRedirect enabled="true" destination="http://domain.com/services" httpResponseStatus="Permanent" />
</system.webServer>
</location>
<location path="products.htm">
<system.webServer>
<httpRedirect enabled="true" destination="http://domain.com/products" httpResponseStatus="Permanent" />
</system.webServer>
</location>
</configuration>[/code]
You may add as many location paths as necessary.
The second example will redirect an entire directory to a new location. For example, if you want http://domain.com/olddir/ redirected to http://domain.com/newdir/ open web.config in /olddir and add the following line of code within the <system.webServer> section:
<httpRedirect enabled="true" destination="http://domain.com/newdir" httpResponseStatus="Permanent" />[/quote]
http://knowledge.freshpromo.ca/seo-tools/301-redirect.php