Copilot commented on code in PR #2015:
URL: https://github.com/apache/apisix-website/pull/2015#discussion_r3058286135


##########
.htaccess:
##########
@@ -41,10 +41,10 @@ Redirect 302 "/slack" 
"https://join.slack.com/t/the-asf/shared_invite/zt-1ugrg37
 Redirect 302 "/community-meeting-signup" 
"https://docs.google.com/forms/d/1C9bIJ3eh0bQrBdv4rPGxHDUvX4giNQ_IRCmDDOQ2mgE/";
 Redirect 302 "/contributor-workshop-signup" 
"https://docs.google.com/forms/d/1LUER3R9-aFsUm7MhjVd_CM1xAGnkuWIe62prFH5aqAE/";
 Redirect 302 "/guest-blog-post" "https://forms.gle/unQpSm7FyqkfaSSP8/";
-RedirectMatch 302 "^/docs/apisix/getting-started/$" 
"/docs/apisix/getting-started/README/"
-RedirectMatch 302 "^/zh/docs/apisix/getting-started/$" 
"/zh/docs/apisix/getting-started/README/"
-RedirectMatch 302 "^/docs/apisix/3\.2/plugins/(.*)$" 
"https://apache-apisix.netlify.app/docs/apisix/3.2/plugins/$1";
-RedirectMatch 302 "^/zh/docs/apisix/3\.2/plugins/(.*)$" 
"https://apache-apisix.netlify.app/zh/docs/apisix/3.2/plugins/$1";
+RedirectMatch 301 "^/docs/apisix/getting-started/$" 
"/docs/apisix/getting-started/README/"
+RedirectMatch 301 "^/zh/docs/apisix/getting-started/$" 
"/zh/docs/apisix/getting-started/README/"
+RedirectMatch 301 "^/docs/apisix/3\.2/plugins/(.*)$" 
"https://apache-apisix.netlify.app/docs/apisix/3.2/plugins/$1";
+RedirectMatch 301 "^/zh/docs/apisix/3\.2/plugins/(.*)$" 
"https://apache-apisix.netlify.app/zh/docs/apisix/3.2/plugins/$1";

Review Comment:
   Switching these redirects from 302 to 301 makes them permanently cacheable 
by browsers and search engines. If the Netlify target host/path is not 
guaranteed to be long-lived (or could change again), consider keeping a 
temporary redirect (302/307) to avoid hard-to-revert caching behavior; 
otherwise, document why a permanent redirect is intended here.
   ```suggestion
   RedirectMatch 302 "^/docs/apisix/3\.2/plugins/(.*)$" 
"https://apache-apisix.netlify.app/docs/apisix/3.2/plugins/$1";
   RedirectMatch 302 "^/zh/docs/apisix/3\.2/plugins/(.*)$" 
"https://apache-apisix.netlify.app/zh/docs/apisix/3.2/plugins/$1";
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to