`_ or submit an
-issue on Github.
diff --git a/doc/_templates/api_redirect.html b/doc/_templates/api_redirect.html
index 24bdd8363830f..c04a8b58ce544 100644
--- a/doc/_templates/api_redirect.html
+++ b/doc/_templates/api_redirect.html
@@ -1,15 +1,10 @@
-{% set pgn = pagename.split('.') -%}
-{% if pgn[-2][0].isupper() -%}
- {% set redirect = ["pandas", pgn[-2], pgn[-1], 'html']|join('.') -%}
-{% else -%}
- {% set redirect = ["pandas", pgn[-1], 'html']|join('.') -%}
-{% endif -%}
+{% set redirect = redirects[pagename.split("/")[-1]] %}
-
+
This API page has moved
- This API page has moved here.
+ This API page has moved here.
-
\ No newline at end of file
+