X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fweb%2Fserver%2Flilypond.org.htaccess;h=d6bc37fb5936ebfd6ffefd80f5b8027664e26d09;hb=317855213ec27520789106310b58d67e116457e6;hp=d4ba378dbef4277ef0235dc5c45e400cc08ad6b1;hpb=2b7ab5b373a459daa3f39b8ddf592996345f699f;p=lilypond.git diff --git a/Documentation/web/server/lilypond.org.htaccess b/Documentation/web/server/lilypond.org.htaccess index d4ba378dbe..d6bc37fb59 100644 --- a/Documentation/web/server/lilypond.org.htaccess +++ b/Documentation/web/server/lilypond.org.htaccess @@ -16,6 +16,10 @@ RewriteEngine On +# Permanent redirect from www.lilypond.org to lilypond.org +RewriteCond "%{HTTP_HOST}" "^www\.(.+)$" [NC] +RewriteRule "^/?(.*)$" "http://%1/$1" [R=301,L,NE] + # Deny following of symlinks by robots. # HTTrack is a known offender. # better yet, to redirect this to page that tells adminstrator @@ -37,7 +41,6 @@ RedirectMatch ^/documentation/$ /doc # RedirectMatch ^/bugs /bug-reports #RedirectMatch ^/bugs http://code.google.com/p/lilypond/issues/list -RedirectMatch ^/wiki http://wiki.lilynet.net # the new website already has an /authors #RedirectMatch ^/authors /doc/Documentation/topdocs/AUTHORS # the new website has news on the main page @@ -46,14 +49,17 @@ RedirectMatch ^/stable /doc/stable # the new website has a dedicated page for development. #RedirectMatch ^/development /doc/development -#old# default doc dir -RedirectMatch ^/doc/*$ /doc/v2.16 -# make attempt at `latest' symlink avoid ^v catch-all doc fix rule below -RedirectMatch ^/doc//*latest/*(.*)$ /doc/v2.17/$1 -RedirectMatch ^/doc//*development/*(.*)$ /doc/v2.17/$1 -RedirectMatch ^/doc//*stable/*(.*)$ /doc/v2.16/$1 -RedirectMatch ^/doc//*([^v].*)$ /doc/v2.16/$1 -RedirectMatch ^(/Documentation.*)$ /doc/v2.16$1 +# Main doc URL redirects +RedirectMatch ^/doc/?$ /manuals +RedirectMatch ^/doc/stable/?$ /manuals +RedirectMatch ^/doc/development/?$ /development + +# Allow to use deep links to latest stable or development docs +RedirectMatch ^/doc//*latest/*(.*)$ /doc/v2.19/$1 +RedirectMatch ^/doc//*development/*(.*)$ /doc/v2.19/$1 +RedirectMatch ^/doc//*stable/*(.*)$ /doc/v2.18/$1 +RedirectMatch ^/doc//*([^v].*)$ /doc/v2.18/$1 +RedirectMatch ^(/Documentation.*)$ /doc/v2.18$1 RedirectMatch ^/index$ / # fix root calculation: no double slashes @@ -110,7 +116,7 @@ RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)$ %{ENV:WEB}/$1 [QSA,L] ## Redirect the old web/ to the homepage -RedirectMatch 301 /web/* / +RedirectMatch 301 ^/web/.* / ########################################### @@ -124,9 +130,18 @@ AddCharset utf-8 .fr AddCharset utf-8 .nl AddCharset utf-8 .txt -# fix broken auto language selection for Hungarian +# Add extensions for language negotiation +# See: https://www.w3.org/International/questions/qa-apache-lang-neg +AddLanguage ca .ca +AddLanguage cs .cs +AddLanguage de .de +AddLanguage es .es +AddLanguage fr .fr AddLanguage hu .hu - +AddLanguage it .it +AddLanguage ja .ja +AddLanguage nl .nl +AddLanguage zh .zh # FIXME: separate this from the main "root" .htaccess material