Skip to content

[Feature] Redirect exact path #11914

@fishnux

Description

@fishnux

1Panel Version

v2.1.0

Please describe your needs or suggestions for improvements

In a static website, I need to setup a redirect rule matching / exactly. Currently, if I select redirect type "path" and write "/", ALL requests are redirected, not just those against the index (/) page

Please describe the solution you suggest

In addition to "Domain", "path", "404" redirect types, support "Exact path":

rewrite ^/$ https://example.com/? redirect; 
// or more correctly:
location = / {
    return 302 https://example.com;
}

Additional Information

Image

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions