script to generate redirects, which is embeded into .htaccess