lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: redirect old /web/ to homepage - issue 1272 (issue 47860043)


From: fedelogy
Subject: Re: redirect old /web/ to homepage - issue 1272 (issue 47860043)
Date: Thu, 09 Jan 2014 20:52:55 +0000

Reviewers: Graham Percival,


https://codereview.appspot.com/47860043/diff/1/Documentation/web/server/lilypond.org.htaccess
File Documentation/web/server/lilypond.org.htaccess (right):

https://codereview.appspot.com/47860043/diff/1/Documentation/web/server/lilypond.org.htaccess#newcode75
Documentation/web/server/lilypond.org.htaccess:75: RewriteRule ^(/*)$
%{ENV:WEB}/ [QSA,L]
On 2014/01/09 09:42:54, Graham Percival wrote:
I'm not too clear on this stuff.  Did we define ENV:WEB somewhere?

at the beginning of the rewrite rules I see:
SetEnvIf REQUEST_URI .* WEB=/website

WEB used to be /web, then it changed to /website (and someone forgot to
edit the comments accordingly).

Description:
redirect old /web/ to homepage - issue 1272

Also disable indexing of /web/

Please review this at https://codereview.appspot.com/47860043/

Affected files (+10, -5 lines):
  M Documentation/web/server/lilypond.org.htaccess
  M Documentation/web/server/robots.txt


Index: Documentation/web/server/lilypond.org.htaccess
diff --git a/Documentation/web/server/lilypond.org.htaccess b/Documentation/web/server/lilypond.org.htaccess index 5e7dfae3d98773b58516b45122318f187bfd7716..d4ba378dbef4277ef0235dc5c45e400cc08ad6b1 100644
--- a/Documentation/web/server/lilypond.org.htaccess
+++ b/Documentation/web/server/lilypond.org.htaccess
@@ -61,7 +61,7 @@ RedirectMatch ^/index$ /

 ###########################################

-## Rewrite all non-existing files at toplevel to the /web/ dir, so our
+## Rewrite all non-existing files at toplevel to the /website/ dir, so our
 ## internal structure for rsync doesn't have to be changed.
 ## This works for the current/old site as well as the new one.

@@ -70,7 +70,7 @@ RewriteBase /

 SetEnvIf REQUEST_URI .* WEB=/website

-# Rewrite empty to /web
+# Rewrite empty to /website
 RewriteCond %{REQUEST_URI} ^/*$
 RewriteRule ^(/*)$ %{ENV:WEB}/ [QSA,L]

@@ -80,12 +80,12 @@ RewriteCond %{REQUEST_URI} ^/?[^/]+[.]css$
 RewriteCond %{REQUEST_FILENAME} !-f
 # ...and does not match an existing directory
 RewriteCond %{REQUEST_FILENAME} !-d
-# ...prefix with web
+# ...prefix with website
 RewriteRule ^(.+)$ %{ENV:WEB}/$1 [QSA,L]

 # Request without trailing slash
 RewriteCond %{REQUEST_URI} !.*/$
-# ...that would access a directory in /web
+# ...that would access a directory in /website
 RewriteCond %{DOCUMENT_ROOT}%{ENV:WEB}%{REQUEST_URI} -d
 # ...and does not start with /web
 RewriteCond %{REQUEST_URI} !^%{ENV:WEB}
@@ -95,7 +95,7 @@ RewriteCond %{REQUEST_URI} !^/doc$
 # ...add trailing slash for [menu] and to avoid /web/ in browser url
 RewriteRule ^(.+)$ http://%{HTTP_HOST}/$1/ [R,QSA,L]

-# Request that does not start with /web
+# Request that does not start with /website
 RewriteCond %{REQUEST_URI} !^/website
 RewriteCond %{REQUEST_URI} !^%{ENV:WEB}
 # ...and does not start with /doc/
@@ -109,6 +109,9 @@ RewriteCond %{REQUEST_FILENAME} !-d
 # ..prefix with /web
 RewriteRule ^(.+)$ %{ENV:WEB}/$1 [QSA,L]

+## Redirect the old web/ to the homepage
+RedirectMatch 301 /web/* /
+
 ###########################################

 # latin1 version copied to web and doc/2.x
Index: Documentation/web/server/robots.txt
diff --git a/Documentation/web/server/robots.txt b/Documentation/web/server/robots.txt index ccc8ed800dd36032733f74e5ba6d2dad63e61f73..8213d0e215d5b6684347dd98dbb1279ae743402e 100644
--- a/Documentation/web/server/robots.txt
+++ b/Documentation/web/server/robots.txt
@@ -21,3 +21,5 @@ Disallow: /doc/v2.12/
 Disallow: /doc/v2.13/
 Disallow: /doc/v2.14/
 Disallow: /doc/v2.15/
+
+Disallow: /web/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]