Home Nginx 301 Redirect not working correctly
Reply: 0

Nginx 301 Redirect not working correctly

user528
1#
user528 Published in May 24, 2018, 3:53 pm

I'm trying to redirect all traffic from one subfolder to another. For example:

www.website.com/ve/12345.html

to

www.website.com/es/12345.html

My nginx command:

rewrite ^/(ve)/(.*)$ /es/$1 permanent;

Does the following:

www.website.com/ve/12345.html

to

www.website.com/es/ve

How can I replace ve with es and keep the rest of the URL intact?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.372615 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO