I moved to a new software and now need to catch the old urls and rewrite them to the new ones.
Here is an example:
Old url: http://www.religiousforums.com/forum/neopagan-revival-religions-dir/19088-druid-horoscope-whats-your-sign.html New url: https://www.religiousforums.com/threads/druid-horoscope-whats-your-sign.19088/
I tried this but it does not work:
location ~* ^/forum/[^/]+/[0-9]+-[^\.]+\.html$ {
rewrite [^/]+/([0-9]+)-[^\.]+\.html$ /threads/$1/ last;
}
What am I missing here? I only need the id in the new url. The text is not important.