Sep 13, 2018

How to configure URL redirect in Apache

For example, to redirect to

RewriteEngine on
RewriteBase /
RewriteRule ^superman/I?(.*)$$1 [R=301,L]
For performance, it is better implemented in configuration file. The advantage of .htaccess is that you don't need to restart Apache. So you can put it to both configuration file and .htaccess file, then you can restart Apache later.