URL redirection with Apache

mod_rewrite is a powerful Apache module that allows to rewrite URL using regular expressions. To redirect the old site to the new one, put on the main Web server config or in the .htaccess file:

RewriteEngine On
RewriteRule ^.*$ https://mynew.url{REQUEST_URI} [L,NE]
About the Author

Leave a Reply

%d bloggers like this: