Code Monkey home page Code Monkey logo

redirections's Introduction

Outil de gestion des redirections

Vous pouvez par exemple rediriger : https://workinfrance.beta.gouv.fr vers https://work-in-france.incubateur.social.gouv.fr/

Comment utiliser ?

La redirection fonctionne sous réserve de ces trois conditions:

  1. configuration de la redirection anciendomaine -> nouveaudomaine dans ce dépôt: créez une pull request en ajoutant votre domaine dans servers.conf.erb (si vous voulez de l'aide sur le config nginx, vous pouvez demander sur #incubateur-ops sur le Mattermost); le déploiement est automatique
  2. configuration du DNS: anciendomaine est un CNAME vers betagouv-redirections.osc-fr1.scalingo.io.
    • Vous devez avoir accès à la configuration DNS du domaine redirigé. Si anciendomaine est de la forme ancien.beta.gouv.fr c'est la zone DNS beta.gouv.fr qu'il faut modifier sur OVH (vous pouvez demander sur #incubateur-ops sur le Mattermost)
  3. configuration de Scalingo: déclarer anciendomaine parmi les domaines de l'app redirection
    • Vous devez avoir accès à la console Scalingo de l'app betagouv-redirection. A défaut, vous coordonner avec des personnes qui ont ces accès; vous pouvez demander sur le chan #incubateur-ops du Mattermost beta.

Notes

Si vous hésitez, demandez de l'aide sur Mattermost:

Redirections possible:

  • Soit utilisation de rewrite: Si vous hésitez entre rewrite "permanent" ou pas:

    • avec rewrite "permanent" -> les moteurs de recherche vont remplacer l'ancienne adresse par la nouvelle, les navigateurs vont garder la redirection en cache et afficheront directement le nouveau site.
    • si on ne met pas "permanent" -> les moteurs de recherche garde affiché l'ancienne adresse dans les résultats, les navigateurs testeront toujours l'ancienne adresse. C'est utile si l'ancienne adresse doit continuer à être utilisé et que l'on veut se permettre de pouvoir changer la redirection.
    • Le $1 a la fin de l'url de redirection indique que vous conservez la partie après le domaine ( https://workinfrance.beta.gouv.fr/mapage?params devient https://work-in-france.incubateur.social.gouv.fr/mapage?params
  • Soit utilisation de return 301: les navigateurs afficheront directement le nouveau site. Le plus simple, rapide et demande moins de traitement pour nginx

server {
  server_name anciendomaine;
  listen <%= ENV['PORT'] %>;
  return 301 $scheme://nouveaudomaine$request_uri;
}

redirections's People

Contributors

danielbmy avatar dlequepeys avatar flightan avatar guillett avatar jdauphant avatar linkinou avatar mmachado-pass avatar morendil avatar mquandalle avatar n1k0 avatar pli01 avatar sblondon avatar totakoko avatar tristanrobert avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.