[GH-ISSUE #1742] Creating a redirection host with a preserve path option prepends a forward slash to the redirected URL #1297

Open
opened 2026-02-26 06:36:37 +03:00 by kerem · 6 comments
Owner

Originally created by @realies on GitHub (Jan 9, 2022).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1742

It looks like this within the generated conf file:

return 302 https://some.tld/asdf$request_uri;

This resolves to the following when accessed and the request_uri is empty:

https://some.tld/asdf/

In some cases, the prepended forward-slash breaks the expected functionality and the following may be expected:

https://some.tld/asdf
Originally created by @realies on GitHub (Jan 9, 2022). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1742 It looks like this within the generated conf file: ``` return 302 https://some.tld/asdf$request_uri; ``` This resolves to the following when accessed and the request_uri is empty: ``` https://some.tld/asdf/ ``` In some cases, the prepended forward-slash breaks the expected functionality and the following may be expected: ``` https://some.tld/asdf ```
Author
Owner

@TheFacelessOne commented on GitHub (Mar 16, 2023):

I'm having the same issue, I've tried both with and without the preserve path option enabled.

<!-- gh-comment-id:1471295016 --> @TheFacelessOne commented on GitHub (Mar 16, 2023): I'm having the same issue, I've tried both with and without the preserve path option enabled.
Author
Owner

@github-actions[bot] commented on GitHub (Feb 27, 2024):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:1965644073 --> @github-actions[bot] commented on GitHub (Feb 27, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@pbvdven commented on GitHub (Mar 7, 2024):

same issue here

<!-- gh-comment-id:1982118874 --> @pbvdven commented on GitHub (Mar 7, 2024): same issue here
Author
Owner

@github-actions[bot] commented on GitHub (Dec 3, 2024):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:2513386044 --> @github-actions[bot] commented on GitHub (Dec 3, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@realies commented on GitHub (Dec 3, 2024):

bump

<!-- gh-comment-id:2513476744 --> @realies commented on GitHub (Dec 3, 2024): bump
Author
Owner

@github-actions[bot] commented on GitHub (Aug 18, 2025):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:3194890232 --> @github-actions[bot] commented on GitHub (Aug 18, 2025): Issue is now considered stale. If you want to keep it open, please comment :+1:
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#1297
No description provided.