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
- php refresh current page?
- WordPress wp-admin https redirect loop
- Host the wp-admin on another domain?
- WordPress localhost site redirect to live site
- Login redirect to previous page
- WordPress install enters an infinite loop
- WordPress HTTPS redirect loop
- Using `auth_redirect` : keeps asking me to login even when I’m logged in
- How can I move/redirect single blog posts from one blog to another?
- How do I skip wordpress’s 404 handling?
- Moving variables from one page to another
- How to create a 301 redirect that doesn’t apply to subsites
- Custom Registration page – prevent redirect to wp-login.php?action=register
- https redirect (with .htaccess) redirect loop
- homepage redirects to login page when user session expires
- How to redirect user to a specific page based on username?
- Redirect blog archive into certain format
- How to publish new posts/pages in root instead of subfolder, but keep old structure in place?
- forward domain name to particular page?
- Contact Form 7 Data to Whatsapp Link
- How can I replace my primary url globally with a parked one?
- I need to redirect an entire subdirectory in WordPress to the homepage – is this correct?
- My website on checking showing 403 error on HTTP Status [closed]
- Redirecting Pages That No Longer Exist — But Could in the Future
- Woocommerce – Want to block a user agent from accessing specific product pages
- How do I determine what is causing a redirect for a given page?
- Trouble running local WordPress in Google App Engine
- Empty folder being created by WordPress, breaks site
- About to migrate site to new domain
- WordPress directing to Posts page (edit.php) instead of saving post
- HTML Redirect to WP pages
- Changing theme = change home page for mobile visitors?
- Redirect User on Login based on role WP 3 – Multi-Site
- production site routes to staging site after cloning
- Redirect old URL (with different post ID) to new URL
- How to redirect an old page url to the homepage
- Custom URL routes
- Delete Redirect Slug For Specific Post
- Duplicated WP site manually, now links redirect wrong [closed]
- Load function with login_redirect
- All URLs Redirect to Main Page
- Parked domain redirecting to wrong error404 page
- Subdomain redirect problem
- redirect from old URL structure
- How to Redirect WordPress domain.com/?anyword to 404 Page?
- Error in /blog redirection – ubuntu default WP installation
- wordpress automatic URL ‘page’ parameter rewrite
- How to redirect user to the specific URL and display notice
- WordPress not loggin user and redirecting after custom registration
- How to 301 redirect to subdirectory but keep access to wp-admin of main domain
- Pagination redirect set in .htaccess file is not working
- International characters in slugs to redirect to
- How to Block WordPress from subdomain?
- WordPress redirect to splash page once a day for the first week
- after logout, get_current_user_id still holds value
- Solution for WordPress URL structure changes and 301 redirects?
- How to change Ugly link?
- How to redirect users without permission to view content to a custom page?
- redirect the root of a domain, while leaving the www version unredirected
- How to Create Custom Route to a page in WordPress
- How to create a redirect to another domain like safe redirect manager from php
- Post Migration Site Migration Redirects All Known Solutions Attempted
- In Nginx, how can I rewrite all http requests to https while maintaining sub-domain?