Hi, I'm new here.
Trying to work on an nginx redirect
I'm using wordpress.
The goal is to change techraptor.net/%year%/%monthnum%/%day%/%postname%
(techraptor.net/2014/10/05/articlename) to
techraptor.net/content/%postname%
location ~ ^/[0-9]{4}/[0-9]{2}/[0-9]{2}/(.*)$
{
return 301 /$1 permanent;
}
This is what I have so far, but something isn't right. Nginx won't load it.
What am I doing wrong? I've tried this in a testing server block to avoid complications from other location blocks.
Trying to work on an nginx redirect
I'm using wordpress.
The goal is to change techraptor.net/%year%/%monthnum%/%day%/%postname%
(techraptor.net/2014/10/05/articlename) to
techraptor.net/content/%postname%
location ~ ^/[0-9]{4}/[0-9]{2}/[0-9]{2}/(.*)$
{
return 301 /$1 permanent;
}
This is what I have so far, but something isn't right. Nginx won't load it.
What am I doing wrong? I've tried this in a testing server block to avoid complications from other location blocks.