Problems with the Redirect app on Wordpress

My YunoHost server

Hardware: VPS bought online
YunoHost version: 4.2.6.1 (stable)
I have access to my server : Through SSH
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
If yes, please explain:

Description of my issue

Hello,
I’m redirecting a domain.com to www.domain.com with the Redirect app (I’ve choosen 301, permanent redirect).

My problem is that www.domain.com/blog/post1 works while domain.com/blog/post1 redirects me www.domain.com but not on the specified page.

How can I fix that?

Thank you.

Ok I fixed it.

Open your redirect conf file. To redirect domain.com to www.domain.com

sudo nano /etc/nginx/domain.com.d/redirect*

It has to be

location / {
  return 301 https://domain.com$request_uri;
}

add $request_uri

I hope it can help.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.