php - NGINX Folder to ROOT redirect / rewrite


My question is the following: i want to redirect 301 from a folder to root to

with .htacces i would create a 301 redirect. how do i do it with NGINX thanks




You should add this rules in server block:

location ~ /shop/ {
            rewrite ^ https://$host permanent;

People are also looking for solutions to the problem: What's the biggest number PHP can handle?


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.