From 8b110df32ac58ec3227d6a0f3d986b56551deda7 Mon Sep 17 00:00:00 2001 From: Francesco Siddi Date: Fri, 2 Jun 2017 11:18:57 +0200 Subject: [PATCH] Convert all Redirects to RewriteRules in Apache conf This allows for more precise redirection. Using the correct code (301, permanently moved) and L (Last rule, prevent any further evaluation). --- docker/4_run/000-default.conf | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/docker/4_run/000-default.conf b/docker/4_run/000-default.conf index 047ef7b..76bceee 100644 --- a/docker/4_run/000-default.conf +++ b/docker/4_run/000-default.conf @@ -35,15 +35,14 @@ RewriteCond "%{HTTP_HOST}" "^cloudapi\.blender\.org" [NC] RewriteRule (.*) /api$1 [PT] - # Redirect for blender-cloud main project - RewriteRule "^/p/blender-cloud/?$" "/blog" [R=302] + # Redirects for blender-cloud projects + RewriteRule "^/p/blender-cloud/?$" "/blog" [R=301,L] + RewriteRule "^/agent327/?$" "/p/agent-327" [R=301,L] + RewriteRule "^/caminandes/?$" "/p/caminandes" [R=301,L] + RewriteRule "^/cf2/?$" "/p/creature-factory-2" [R=301,L] + RewriteRule "^/characters/?$" "/p/characters" [R=301,L] + RewriteRule "^/gallery/?$" "/p/gallery" [R=301,L] + RewriteRule "^/hdri/?$" "/p/hdri" [R=301,L] + RewriteRule "^/textures/?$" "/p/textures" [R=301,L] - # Redirects for short links - Redirect /agent327 /p/agent-327 - Redirect /caminandes /p/caminandes-3 - Redirect /cf2 /p/creature-factory-2 - Redirect /characters /p/characters - Redirect /gallery /p/gallery - Redirect /hdri /p/hdri - Redirect /textures /p/textures