Skip to content

How to add a redirect for a file/folder using nginx custom user.conf? #1849

Discussion options

You must be logged in to vote

sudo required.

  1. nano /opt/easyengine/sites/www.example.com/config/nginx/custom/user.conf
# Custom Nginx configuration can be put here
location = /folder/ {
  return 301 /relocated/folder/;
}
location = /folder/file.html {
  return 301 /relocated//folder/file.html;
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gingerbeardman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant