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

Problem with 301 redirect

$
0
0
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.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



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