I have a .txt file with page names from an old website which I need to redirect to a folder to keep it up with the new url structure.
For example, website.com/post1/ to website.com/folder/post1/
But there are also some pages like website.com/page1/ which I don't want to redirect therefore I don't think I can use RewriteRule and want to go with RewriteMap.
I have this in my txt file calles old-urls.txt
post1 post1
post2 post2
post3 post3
I have this in my .htaccess:
ReqriteEngine on
RewriteMap oldurls "txt:/home/httpd/vhosts/website.com/httpdocs/old-urls.txt"
RewriteRule "^/(.*)" "/folder/${oldurls:$1}" [R]
Now I get 500 Internal Server error on all pages of my website. Which direction should I go?