Hi,
I am currently moving from an apache setup and have tried to do a mass of rewrites. I am worried about issues with a regex interrupting my new URL scheme, so in the process of the move from server to server and new software, I write out a reference of all of the 4000 articles with links to their new articles.
However I can not get the map to pick up. The ID actually changes between the new setup though which is why I generate the map file and reference database table
THe old URL looks like
http://mysite.com/123456/article-title
and the new URL is
http://mysite.com/threads/article-title.656565
So my map file looks like
location / {
include /usr/local/etc/nginx/conf.d/php-fpm;
include /usr/local/etc/nginx/rewrite_rules_x.map;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
index index.php index.html index.htm;
try_files $uri $uri/ /silverforo/index.php?$uri&$args;
}
rewrite /123455/article-title /threads/atrticle-title.656565/ permanent;
I then include that within my location directive
This just doesnt get picked up at all and it just launches my error page of the app.
I have tried a few variations of this with no luck as well. I also tried direct redirects and no luck.
I could possibly do a redirect with an intermediary file that takes the ID from the URL and then queries the database to get the new URL and does a http 301 redirect.
However I just cant get that working either!
Any chance anyone has any ideas?
cheers
Dan