There are several ways to enable https on your wordpress site.
You need to update your site urls including https in it if you have access to your dashboard
You can also define both the WP_SITEURL
and WP_HOME
in your test wp-config.php
define( 'WP_SITEURL', 'http://example.com.mytestdomain.com' );
define( 'WP_HOME', 'http://example.com.mytestdomain.com' );
In relation to your nginx config:
You can use an if block instead of nesting the rewrite in your base location
if ($host ~* ^example\.com$) {
rewrite ^(.*)$ https://example.com$1 permanent;
}
Related Posts:
- WordPress redirect loop on nginx + apache reverse proxy
- Infinite loop behind SSL proxy on non-standard port
- 301 Redirect Loop www to non-www – Nginx + Apache2
- WordPress redirecting connections on port 8080 to 80
- Why is WordPress redirecting from http to https on a local environment?
- How to configure nginx to redirect requests to the uploads directory to the production server?
- Force HTTPS using .htaccess – stuck in redirect loop
- How to setup 301 redirects for multiple query string URLs?
- How to redirect url requests to https? [closed]
- Mixed Content with SSL, wordpress behind a reverse proxy
- 302 redirect to signup with nginx reverse proxy
- https multiple redirects
- Can I check for maintenance mode before redirecting to subdomain?
- Disabling HTTPS redirection for migration
- Strange redirection issues on wordpress from ssl with padlock to ssl without padlock
- How do I map a subdomain in wordpress to the primary domain in a multisite setup?
- WordPress Redirecting HTTPS Requests to HTTP
- What is the right way to redirect all traffic to HTTPS?
- SSL and www to non-www redirection works only on homepage – WordPress
- I get redirected too many times only in wp-admin?
- ReDirect subfolder link to another sub-folder and force SSL
- Blog has an infinite redirect loop
- How to fix too many redirects when enabling SSL for site?
- WordPress CSS/Theme gone after SSL got activated
- My site doesn’t redirect from HTTP to HTTPS
- Only execute function if SSL is set up properly
- HTTPS to HTTP rewrite rules not working as expected
- Browsers Forcing Multisite to https
- Is the default value of FORCE_SSL_ADMIN documented?
- I get “too many redirects” problem when migrating localhost site
- redirect_to ignoring the SSL
- Moving site from HTTP to HTTPS
- Force SSL on a single page which is used as iFrame
- How to block direct access to files upload in edd folder
- How to map secure.domain.com to www.domain.com or domain.com with “WordPress MU Domain Mapping” on the primary multisite domain?
- How to force or redirect to SSL in nginx?
- How to force HTTP and stop SSL completey on WordPress website
- Site1 wordpress website redirect to other site2 in my same server
- PHP header(Location: …): Force URL change in address bar
- What does HTTP/1.1 302 mean exactly?
- php refresh current page?
- How do you redirect HTTPS to HTTP?
- WordPress X Theme – Cloudflare Flexible SSL – Pingdom Speed Test No Longer Working?
- WordPress wp-admin https redirect loop
- How to force a 404 on WordPress
- Disable front end to use as CMS only?
- Redirect Restricted Page to 404
- How to redirect non-logged in users to a specific page?
- How to prevent automatic redirection of 404 errors and “incorrect” URLs?
- How do I skip wordpress’s 404 handling and redirect all 404 errors for static files to 404.html?
- Disable WordPress URL auto complete
- Host the wp-admin on another domain?
- Redirect user to original url after login?
- When I change slug, will WordPress create redirect from the old URL?
- WordPress localhost site redirect to live site
- WordPress Redirect All HTTP requests to HTTPS via .htaccess
- wp_redirect() function is not working
- Redirect entire website to a single page
- My wordpress multisite homepage redirects to signup page
- Logout redirect to home page
- Disable ONLY URL auto complete, not the whole canonical URL system
- Redirect Localhost wordpress site to dashboard
- Redirect page URL to home URL without using a plugin
- Login redirect to previous page
- How to prevent redirect to ‘About’ after core upgrade?
- 301 redirect instead of 404 when URL is a prefix of a post or page name?
- Why is wp_redirect() preferable to a standard PHP header redirect?
- How do I programmatically generate a 404?
- Redirect to referring page after logging in
- User redirect to destination URL after login
- Prevent access to single post types
- check first time login only
- How to change the default logout link on WordPress Admin
- Stop WordPress from “guessing” redirects for nonexistent URLs
- SSL redirect loop using WordPress HTTPS Plugin
- WordPress install enters an infinite loop
- How to redirect a sucessful registration to a page template?
- WordPress HTTPS redirect loop
- Why am I getting a 301 on a existing post?
- Redirect to dashboard after login
- Make a video post redirect to next post after completion
- Old blog/ and blog/feed/ URLs not working after moving blog to top-level via .htaccess
- Non-WordPress page in subdirectory under WordPress page
- How to redirect after login, the working way?
- Keeps on redirecting on my development copy
- Password change when the user login first time
- Custom login form redirect to external site
- Redirecting WordPress /.htaccess / HSTS / SSL
- 301 redirect not working through .htaccess
- handling login/logout redirects
- Clarification on auth_redirect()
- Site redirects to wrong url when saving settings
- How to redirect all requests to wp-login.php?
- Implementing global redirection (automatic redirect for all pages who had their slug changed)
- Correct way to hide pseudo pages from being shown?
- Redirect blog page to latest post?
- Redirect to custom url when registration fails?
- Why does WordPress automatically redirect URLs with the parameter “name=” to a different page?
- prevent/block direct access to a thank you page
- Redirect After Delete User in Backend