Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Redirect subfolder with nginx

$
0
0
Hi, i'm new to nginx, i need create a redirect with a subfolder.
I need redirect 2 link to same folder, ex.

www.domain.com ---> /path/to/files
www.domain.com/foo ---> /path/to/files

I have tried with "location" but don't work:

server {

listen 81;
server_name domain.com;
index index.php index.html;
root /path/to/files;
location /foo {
root /path/to/files;
index index.html;
}
}

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>