<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 2.6//EN"
        "http://tuckey.org/res/dtds/urlrewrite2.6.dtd">

<!--

    Configuration file for UrlRewriteFilter
    http://tuckey.org/urlrewrite/

-->
<urlrewrite>
<!--  TROUVER la bonne url de la css -->
  <rule>
       <from>^(.*)/media/(.*)$</from>
       <to last="true">/media/$2</to>
  </rule>
  <!-- laisser passer les anciennes url -->
  <rule>
       <from>^/ws(.*)$</from>
       <to last="true">/ws$1</to>
  </rule>
  <!--  les url de démarrage -->
	<rule>
       <from>^$</from>
       <to last="true">/ws?_redirect=accueil&amp;_lang=fr-FR</to>
  </rule>
  	<rule>
       <from>^/$</from>
       <to last="true">/ws?_redirect=accueil&amp;_lang=fr-FR</to>
  </rule>
    <rule>
       <from>^/index.html$</from>
       <to last="true">/ws?_redirect=accueil&amp;_lang=fr-FR</to>
  </rule>
	
  <!--  ACCUEIL + query string -->
    <rule>
       <from>^/(.*)/accueil$</from>
       <to last="true">/ws?_redirect=accueil&amp;_lang=$1</to>
  </rule>
   <rule>
       <from>^/(.*)/accueil\?(.*)$</from>
       <to last="true">/ws?_redirect=accueil&amp;_lang=$1&amp;$2</to>
  </rule>
  <!--  revenir au dernier écran (changement de langue)  + query string -->
  <rule>
      <from>^/([^/]*)/last$</from>
      <to last="true">/ws?_lang=$1&amp;_cmd=getLastCatalog</to>
  </rule>
   <rule>
      <from>^/([^/]*)/last\?(.*)$</from>
      <to last="true">/ws?_lang=$1&amp;_cmd=getLastCatalog&amp;$2</to>
  </rule>
    <!--  Liste par type de diplôme  + query string -->
  <rule>
      <from>^/([^/]*)/liste/([^/]*)$</from>
      <to last="true" >/ws?_redirect=liste&amp;_lang=$1&amp;_cmd=getAllFormations&amp;__1=__diplome&amp;__diplome=$2</to>
  </rule>
  <rule>
      <from>^/([^/]*)/liste/([^/]*)\?(.*)$</from>
      <to last="true" >/ws?_redirect=liste&amp;_lang=$1&amp;_cmd=getAllFormations&amp;__1=__diplome&amp;__diplome=$2&amp;$3</to>
  </rule>
<!--  LISTE  + query string -->
  <rule>
      <from>^/([^/]*)/liste$</from>
      <to  last="true">/ws?_redirect=liste&amp;_lang=$1&amp;_cmd=getAllFormations</to>
  </rule>
   <rule>
      <from>^/([^/]*)/liste\?(.*)$</from>
      <to  last="true">/ws?_redirect=liste&amp;_lang=$1&amp;_cmd=getAllFormations&amp;$2</to>
  </rule>

  <!--  soumission recherche par POST  + query string -->

   <rule>
      <from>^/([^/]*)/postRecherche$</from>
      <to last="true" >/ws?_redirect=liste&amp;_lang=$1&amp;_cmd=getAllFormations</to>
  </rule>
    <rule>
      <from>^/([^/]*)/postRecherche\?(.*)$</from>
      <to last="true" >/ws?_redirect=liste&amp;_lang=$1&amp;_cmd=getAllFormations&amp;$2</to>
  </rule>
  <!-- onglet et oid   + query string -->
    <rule>
      <from>^/([^/]*)/fiche/([^/]*)/([^/]*)$</from>
      <to last="true" >/ws?_redirect=fiche&amp;_lang=$1&amp;_cmd=getFormation&amp;_oid=$3&amp;_oidSpecialite=&amp;_oidUe=&amp;_onglet=$2</to>
  </rule>
   <rule>
      <from>^/([^/]*)/fiche/([^/]*)/([^/]*)\?(.*)$</from>
      <to last="true" >/ws?_redirect=fiche&amp;_lang=$1&amp;_cmd=getFormation&amp;_oid=$3&amp;_oidSpecialite=&amp;_oidUe=&amp;_onglet=$2&amp;$4</to>
  </rule>
  <!-- onglet et oid puis specialite  + query string -->
   <rule>
      <from>^/([^/]*)/fiche/([^/]*)/([^/]*)/([^/]*)$</from>
      <to last="true" >/ws?_redirect=fiche&amp;_lang=$1&amp;_cmd=getFormation&amp;_oid=$3&amp;_oidSpecialite=$4&amp;_oidUe=&amp;_onglet=$2</to>
  </rule>  
   <rule>
      <from>^/([^/]*)/fiche/([^/]*)/([^/]*)/([^/]*)\?(.*)$</from>
      <to last="true" >/ws?_redirect=fiche&amp;_lang=$1&amp;_cmd=getFormation&amp;_oid=$3&amp;_oidSpecialite=$4&amp;_oidUe=&amp;_onglet=$2&amp;$5</to>
  </rule>  
  <!-- onglet et oid et specialite puis UE  + query string -->
 <rule>
      <from>^/([^/]*)/fiche/([^/]*)/([^/]*)/([^/]*)/(.*)$</from>
      <to last="true" >/ws?_redirect=fiche&amp;_lang=$1&amp;_cmd=getFormation&amp;_oid=$3&amp;_oidSpecialite=$4&amp;_oidUe=$5&amp;_onglet=$2</to>
  </rule>
  <rule>
      <from>^/([^/]*)/fiche/([^/]*)/([^/]*)/([^/]*)/(.*)\?(.*)$</from>
      <to last="true" >/ws?_redirect=fiche&amp;_lang=$1&amp;_cmd=getFormation&amp;_oid=$3&amp;_oidSpecialite=$4&amp;_oidUe=$5&amp;_onglet=$2&amp;$6</to>
  </rule>
<!--  recherche avancée  + query string -->
 <rule>
      <from>^/([^/]*)/recherche$</from>
      <to last="true" >/ws?_redirect=recherche&amp;_lang=$1&amp;_cmd=data</to>
  </rule>
   <rule>
      <from>^/([^/]*)/recherche\?(.*)$</from>
      <to last="true" >/ws?_redirect=recherche&amp;_lang=$1&amp;_cmd=data&amp;$2</to>
  </rule>
  
  <!-- Ajout LG  affichage du pdf -->
  <rule>
      <from>^/([^/]*)/pdf/([^/]*)/([^/]*)$</from>
      <to last="true" >/ws?_cmd=getPdf&amp;_oid=$2&amp;_oidSpecialite=$3&amp;_lang=$1</to>
  </rule>
   <rule>
      <from>^/([^/]*)/pdf/([^/]*)/([^/]*)\?(.*)$</from>
      <to last="true" >/ws?_lang=$1&amp;_cmd=getPdf&amp;_oid=$2&amp;_oidSpecialite=$3&amp;_oidUe=&amp;$4</to>
  </rule>
  
   <!--  Ajout LG : Liste des formations par domaine + query string -->
  <rule>
      <from>^/([^/]*)/listeDomaine/([^/]*)$</from>
      <to last="true" >/ws?_redirect=liste&amp;_lang=$1&amp;_cmd=getAllFormations&amp;__1=__domaine&amp;__domaine=$2</to>
  </rule>
  <rule>
      <from>^/([^/]*)/listeDomaine/([^/]*)\?(.*)$</from>
      <to last="true" >/ws?_redirect=liste&amp;_lang=$1&amp;_cmd=getAllFormations&amp;__1=__domaine&amp;__domaine=$2&amp;$3</to>
  </rule>

</urlrewrite>

