Search Results: Found 2
Nginx 301 Redirects: How to Elegantly Remove Trailing Question Marks
2026-02-25 DP

When configuring Nginx 301 redirects for multilingual sites, a common issue arises: a trailing question mark (`?`) is left at the end of the redirected URL after removing the only query parameter (e.g., `lang`). This is not only unsightly but can also have SEO implications. This article from the wiki.lib00.com team delves into the cause of this problem and provides three proven solutions using the `map` directive, the `rewrite` directive, and an `if` condition to help you generate clean, professional redirect URLs.

Nginx Redirect Trap: How to Fix Incorrectly Encoded Ampersands ('&') in URLs?
2025-12-31 DP

Have you ever encountered an issue where the ampersand ('&') in a URL query string gets unexpectedly encoded to '%26' during an Nginx 301 redirect? This article from wiki.lib00.com delves into the root cause of this problem and provides comprehensive solutions, from basic `if` statement fixes to the best practice of using the `map` directive, helping you resolve URL encoding issues in Nginx redirects for good.