Redirect issues when creating WP site

When I run ee site create example.com I get a bug where the www redirects aren’t always created.

Normally, a file with the redirect rules for the site should be created here:
/opt/easyengine/services/nginx-proxy/conf.d

But on some occasions they’re never created and the www version of a new site will redirect to another site on my server.

I’ve fixed this by adding the correct rules manually but I’m just wondering why it does this for me some times and other times I have to create it manually.

What was the step by step that you followed to correct this error?

Sorry for the delayed response.

Just go to /opt/easyengine/services/nginx-proxy/conf.d

Create a file titled yourwebsite.com-redirect.conf

Here’s the code that should go inside that file:

server {
	listen  80;
	server_name  www.yourwebsite.com;
	return  301 http://yourwebsite.com$request_uri;
}

Then just restart EE

1 Like