a6-plugin-redirect

Configure APISIX redirect rules via the a6 CLI plugin.

1|2|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/api7/a6 --skill a6-plugin-redirect-api7
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: a6-plugin-redirect
Source: https://github.com/api7/a6/tree/main/skills/a6-plugin-redirect
Command: npx skills add https://github.com/api7/a6 --skill a6-plugin-redirect-api7

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Configuring redirects in APISIX can be verbose; this Skill provides a focused, CLI-driven approach to apply redirect rules via the a6 redirect plugin.

Core Features & Use Cases

  • Enforce HTTPS by redirecting HTTP requests
  • Simple URI redirects and external redirects
  • Regex-based path rewrites with capture groups
  • Control status codes, URI encoding, and query string handling

Quick Start

Create a route that enables http_to_https on all paths to force HTTPS.

Frequently Asked Questions about a6-plugin-redirect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure HTTP to HTTPS redirects in APISIX?

To configure APISIX HTTP to HTTPS redirects, use the a6 CLI to apply the redirect plugin with the http_to_https field on a specific route. This enforces secure connections by automatically forwarding unencrypted requests to HTTPS.

Can I use regex capture groups for path rewrites in APISIX routing?

Yes, APISIX routing supports regex-based path rewrites using capture groups via the regex_uri field. Configure this through the a6 CLI redirect plugin to dynamically transform request paths and maintain routing consistency.

What is the best way to manage APISIX redirect rules via CLI?

The best way to manage APISIX redirect rules via CLI is using the a6 redirect plugin. It provides a focused approach to apply consistent per-route configurations for URI redirects, status codes, and query string handling without verbose setup.

Does the APISIX redirect plugin support appending query strings?

Yes, the APISIX redirect plugin supports appending query strings during redirection using the append_query_string field. You can also control URI encoding with encode_uri and specify custom return codes with ret_code via the a6 CLI.

How do I set a custom return code for an APISIX URI redirect?

To set a custom return code for an APISIX URI redirect, configure the ret_code field in the a6 redirect plugin via the CLI. This allows you to specify exact HTTP status codes for simple URI redirects, external redirects, or regex path rewrites.