Skip to content

Commit

Permalink
Get rid of $COLONs in URLs; samcv++
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Apr 16, 2017
1 parent 81a5806 commit 3feecce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion html/.htaccess
Expand Up @@ -6,7 +6,11 @@ RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=permanent,L]
RewriteCond %{HTTP_HOST} ^doc.perl6.org [NC]
RewriteRule ^(.*)$ https://docs.perl6.org/$1 [R=permanent,L]

RewriteRule ^type/(.*?)::(.*) /type/$1\$COLON\$COLON$2 [N]
# We no longer need this, as we swapped the generator to not use the $COLONs on
# non-Windows operating systems. Since we used that earlier, rewrite in reverse
# in case someone is using the long and awful URLs
# RewriteRule ^type/(.*?)::(.*) /type/$1\$COLON\$COLON$2 [N]
RewriteRule ^type/(.*?)\$COLON\$COLON(.*) /type/$1::$2 [N]

Redirect 301 /language/5to6 https://docs.perl6.org/language/5to6-nutshell
Redirect 301 /examples http://examples.perl6.org/
Expand Down
3 changes: 2 additions & 1 deletion lib/Pod/Htmlify.pm6
Expand Up @@ -14,7 +14,8 @@ sub url-munge($_) is export {
return $_;
}

constant badchars = qw[$ / \ . % ? & = # + " ' : ~ < > |];
constant badchars = qw[$ / \ . % ? & = # + " ' ~ < > |]
~ (':' if $*DISTRO.is-win);
my \goodnames = badchars.map: '$' ~ *.uniname.subst(' ', '_', :g);
constant length = badchars.elems;

Expand Down

0 comments on commit 3feecce

Please sign in to comment.