According to nginx pitfalls, it’s slightly better to omit the unnecessary capture, using $request_uri
instead. In that case, append a question mark to prevent nginx from doubling any query args.
server {
listen 80;
server_name signup.mysite.com;
rewrite ^ https://$server_name$request_uri? permanent;
}
Related Posts:
- WordPress redirect loop on nginx + apache reverse proxy
- Infinite loop behind SSL proxy on non-standard port
- Nginx + Redirection Plugin breaks Permalinks [closed]
- SSL via different domain & path with NGINX/PHP-FPM/WP
- 301 Redirect Loop www to non-www – Nginx + Apache2
- I have cloudflare flexible enabled, How to redirect to https for Nginx server
- Rewrite old post images to https
- In Nginx, how can I rewrite all http requests to https while maintaining sub-domain?
- Nginx Redirect via Proxy, Rewrite and Preserve URL
- Remove “www” and redirect to “https” with nginx
- 400 Bad Request – request header or cookie too large
- How can I use environment variables in Nginx.conf
- “413 Request Entity Too Large” in Nginx with “client_max_body_size” set
- Nginx: Failed to start A high performance web server and a reverse proxy server
- NGINX: upstream timed out (110: Connection timed out) while reading response header from upstream
- How to fix nginx throws 400 bad request headers on any header testing tools?
- How do you redirect HTTPS to HTTP?
- How to use NGINX as forward proxy for any requested location?
- “configuration file /etc/nginx/nginx.conf test failed”: How do I know why this happened?
- An unhandled lowlevel error occurred. The application logs may have details
- nginx – two subdomain configuration
- GeoIP.dat.gz and GeoLiteCity.dat.gz not longer available? Getting 404 trying to load it
- Nginx error: client intended to send too large body
- WordPress wp-admin https redirect loop
- WordPress redirecting connections on port 8080 to 80
- Why is WordPress redirecting from http to https on a local environment?
- SSL redirect loop using WordPress HTTPS Plugin
- How to configure nginx to redirect requests to the uploads directory to the production server?
- Force HTTPS using .htaccess – stuck in redirect loop
- wp-json/ return 404, but wp-json/wp/v2/ works fine on my nginx server
- How to setup 301 redirects for multiple query string URLs?
- How to redirect url requests to https? [closed]
- Why wordpress multisite redirect to wp-signup if site exists?
- ERR_TOO_MANY_REDIRECTS status 302, how to configure NGINX locations to work with AWS ALB?
- Mixed Content with SSL, wordpress behind a reverse proxy
- 302 redirect to signup with nginx reverse proxy
- NGINX conf on WP Multisite enabled — subdirectory — images fail to load after updates
- Configuring Routing Rules for WordPress+Nginx and WP-SuperCache?
- https multiple redirects
- Disabling HTTPS redirection for migration
- WordPress multisite subdirectory on nginx behind reverse proxy
- Strange redirection issues on wordpress from ssl with padlock to ssl without padlock
- Why is there an intermediate redirect to https://public-url.org/wp-admin?
- Installation failed: Could not create directory – CentOS 7
- REST API parameters not working with nginx
- How do I map a subdomain in wordpress to the primary domain in a multisite setup?
- WordPress Redirecting HTTPS Requests to HTTP
- Difference between these two nginx try_files statements for WordPress?
- How to test drive WordPress on VPS with LEMP stack before going live?
- nginx.conf appeared in all WordPress installations on folder
- nginx php-fpm, and auto updates?
- What is the right way to redirect all traffic to HTTPS?
- WordPress and nginx, download some pages instead of serving them
- nginx wordpress subdirectory Invalid post type
- ERROR: No such service: nginx when building wordpress with docker [closed]
- SSL and www to non-www redirection works only on homepage – WordPress
- Nginx tries the wrong file when http_cookie matches logged_in
- Htaccess file isn’t redirecting http sub-pages to https––they display 404 error instead, tried many solutions and none work
- Site resolves to www in Firefox and without in Chrome
- I get redirected too many times only in wp-admin?
- Nginx Wildcard SSL with WordPress Multisite Subdomains
- WordPress Nginx Won’t 404
- WordPress file not found and 403 forbidden
- Nginx config, how can I redirect primary multisite domain, but not its sub-folders, nor other domains?
- Too many redirects after added SSL redirect on port 80 virtual host
- Correct regex for Nginx FastCGI cache?
- ReDirect subfolder link to another sub-folder and force SSL
- Redirect the whole blog to SSL but not the RSS feed (under Nginx)
- Random occurences of 502 Bad Gateway using WordPress and Nginx
- Network Admin URL is shown to anyone before accessing a blog
- Limit file downloads to logged in users (WP + Nginx)
- Blog has an infinite redirect loop
- /blog/wp-json/ nginx return 404
- How to fix too many redirects when enabling SSL for site?
- WordPress with Photocrati Theme keeps resetting site URL – help solving underlying problem
- Moving wordpress to different url/server creates redirect loop
- WordPress CSS/Theme gone after SSL got activated
- My site doesn’t redirect from HTTP to HTTPS
- NGINX / WordPress Site – Increasing php.ini max_execution_time = 600 doesn’t work
- Only execute function if SSL is set up properly
- Nginx redirects to an extra subdirectory
- HTTPS to HTTP rewrite rules not working as expected
- Something is injecting a slash after any static file response , server is nginx
- Custom permalinks not work on Nginx + Apache
- Last-Modified header is removed from server response!
- Do I need a DNS on a home network?
- Browsers Forcing Multisite to https
- www redirects to another directory in wordpress
- Is the default value of FORCE_SSL_ADMIN documented?
- WordPress on Ubuntu – “File not Found” for home.php – Trying to Redirect to Root Folder
- 504 Gateway Time-out nginx/1.14.0 (Ubuntu)
- Redirect old /%category%/%postname%/ to just /%postname%/
- WordPress + Nginx (Lightsail) problem with ajax
- Multisite wp-admin redirecting to main wp-admin using NGINX
- I get “too many redirects” problem when migrating localhost site
- Restrict access if logged out except for homepage
- How to force the admin-ajax.php file to load over HTTPS?
- ERR_TOO_MANY_REDIRECTS / To Force SSL Logins and SSL Admin Access
- redirect_to ignoring the SSL
- Moving site from HTTP to HTTPS