Digital Marketing

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.


Popular posts from this blog

Fixed WSL sshd: no hostkeys available -- exiting

PowerMTA pmta command

How to fix: mv: failed to preserve ownership