Redirection web.config problème

Répondre


Cette question est un moyen d’empêcher des soumissions automatisées de formulaires par des robots.
Smileys
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: =D> #-o =P~ :^o :non: :priere: 8-|
Voir plus de smileys
  Revue du sujet
 

  Étendre la vue Revue du sujet : Redirection web.config problème

Re: Redirection web.config problème

par silvering » 02 mars 2012, 10:10

Merci pour ton aide je vais essayé ça je te tiens au courant.

Re: Redirection web.config problème

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

Re: Redirection web.config problème

par silvering » 02 mars 2012, 08:57

Vraiment personne ne peut m'aider? :cry:

Redirection web.config problème

par silvering » 01 mars 2012, 20:58

Bonsoir,

je voudrais rediriger des adresses de types: http://soka-espadrilles.com/collection-fiches.php?c=2 vers http://soka-espadrilles.com/collection-femme.html
J'ai bien procédé au Rewriting d'URL sur le web.config ( site hébergé sur serveur Windows). Voici mon web.config:

Code : Tout sélectionner

<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <caching> <profiles> <remove extension=".xml" /> <add extension=".xml" policy="DontCache" kernelCachePolicy="DontCache" duration="00:00:30" /> </profiles> </caching> <rewrite> <rules> <rule name="Imported Rule 1" stopProcessing="true"> <match url="^collection-femme\.html$" ignoreCase="false" /> <action type="Rewrite" url="/collection-fiches.php?c=2" appendQueryString="false" /> </rule> <rule name="Imported Rule 2" stopProcessing="true"> <match url="^collection-homme\.html$" ignoreCase="false" /> <action type="Rewrite" url="/collection-fiches.php?c=3" appendQueryString="false" /> </rule> <rule name="Imported Rule 3" stopProcessing="true"> <match url="^collection-enfants\.html$" ignoreCase="false" /> <action type="Rewrite" url="/collection-fiches.php?c=13" appendQueryString="false" /> </rule> <rule name="Imported Rule 4" stopProcessing="true"> <match url="^collection-mariage\.html$" ignoreCase="false" /> <action type="Rewrite" url="/collection-fiches.php?c=10" appendQueryString="false" /> </rule> </rules> </rewrite> </system.webServer> </configuration> Comment faire une redirection permanente? Merci.