Redirecting part of URL in Nginx
- by Maca
Trying to move my blog to a new site and I want to redirect some urls. I use nginx.
https://blogurl.com/news/2014-08-19/post-3451/mt-preview-33e2742af1eb.php
The /news/2014-08-19/post-3451/mt-preview-33e2742af1eb.php part would be always moving.
Redirect to below:
https://blogurl.com/content/news/2014-08-19/post-3451/mt-preview-33e2742af1eb.php
I basically want to insert /content/ after https://blogurl.com and so far I have
rewrite ^(.*)$ /content/ break;
But my issue is my CMS sits on the same directory level
https://blogurl.com/mt/admin
and if I simply apply the rewrite above my CMS address would move too. How could I prevent this.