Question
My nginx droplet can be visited at ip and domain name
I have tried few things and I am unable to have my ip redirect to my domain name. I tried redirecting in my sites-available but it breaks all my permalinks. Any ideas?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
What are you trying to do? Usually nginx uses virtual hosts ie: http://www.yourname.com to know which content to display.
so in the browser my site renders correctly with
http://yourname.com
and redirects http://www.yourname.com to -> http://yourname.com (all good)
and when I drop my ip into the browser http://000.000.000.00/ my site is rendering but I would like it to redirect to http://yourname.com. This should be done with a rewrite? I tried whats in the wordpress codex:
no dice.
here is my config: