301 Redirect in Apache with RedirectMatch | Part of mod_alias is something called RedirectMatch. This is a better way to do 301 redirects or other types of redirects than using mod_rewrite for better performance.
How to Redirect a URL in a Virtual Host | Redirecting a URL in a virtual host is a snap! I’ll show you how. Scenario: you have a server that receives example.com but you want that to redirect to example2.com. First you will want to add this to your /etc/apache2/ports.conf (Debian or Ubuntu) or /etc/httpd/conf/httpd.conf (Red Hat or CentOS) if you have not already: NameVirtualHost
Redirect www to non-www | How can I redirect my website to go from http://www.example.com to just plain ol’ http://example.com? Use the following rewrite blurb where appropriate for your website. An easy thing to do is to add this to your .htaccess file in your website’s root directory: