Digital Marketing

How to configure URL redirect in Apache

For example, to redirect example.com/superman/I?q=goyun.info to goyun.info/super?q=goyun.info

.htaccess:
RewriteEngine on
RewriteBase /
RewriteRule ^superman/I?(.*)$ http://goyun.info/super$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.

Comments

Popular posts from this blog

MySQL Sandbox with the Sakila sample database