M
M
magary42018-03-14 12:14:22
Apache HTTP Server
magary4, 2018-03-14 12:14:22

Redirect from old pages using RewriteMap?

site.conf

RewriteMap oldpages "txt:/var/www/web/redirects.txt"
RewriteCond ${oldpages:%1} ^(.+)$
RewriteRule ^/(.*)$ http://%1/$1 [R]

redirects.txt
/lorem/ispum /post123
/lorem.html /post321

it is necessary to redirect from /lorem/ispum to /post123 and from /lorem.html to /post321
how to achieve this?
Thanks

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question