i need to redirect few URLs. 301 permanent
http://example.com/downloads/example.exe to http://example.com/emaple-page/
i need to do this for 3 URLS , i'm going to do this on .conf file
server {
listen 80;
server_name http://example.com/downloads/example.exe;
rewrite ^/(.*) http://example.com/emaple-page/$1 permanent;
}
server {
listen 80;
server_name http://example.com/downloads/example2.exe;
rewrite ^/(.*) http://example.com/emaple-page/$1 permanent;
}
server {
listen 80;
server_name http://example.com/downloads/example3.exe;
rewrite ^/(.*) http://example.com/emaple-page/$1 permanent;
}
i want to know is this correct ? what is the best way to do it ?