Skip to content

Commit 302f017

Browse files
Preserve version on Autoloading Guide redirect
The v4.2 and v5.0 guides are the only guides which link to `constant_autoloading_and_reloading.html`. However, visiting that path in either version currently redirects to the stable version of `autoloading_and_reloading_constants.html`, which is a Zeitwerk guide as of Rails 6.0. This commit preserves the guide version when redirecting.
1 parent 2a71c1d commit 302f017

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config/nginx.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ server {
4141

4242
rewrite /contributing_to_rails.html /contributing_to_ruby_on_rails.html permanent;
4343
rewrite /contribute.html /contributing_to_ruby_on_rails.html permanent;
44-
rewrite /constant_autoloading_and_reloading.html /autoloading_and_reloading_constants.html permanent;
44+
rewrite ^(.*)/constant_autoloading_and_reloading.html$ $1/autoloading_and_reloading_constants.html permanent;
4545

4646
location ~ ^/v\d {
4747
root /home/rails/guides;

0 commit comments

Comments
 (0)