Apache configuration for redirect using httpd.conf and .htacess
File: .htaccess Create a file /home/domain/public_html/.htaccess in that directory of the domain to be forwarded that looks something like this:
- Redirect entire domain:
-
Redirect 301 / http://www.new-domain.com/
Note: The use of the “/” at the end of the redirected domain. This is necessary so that http://www.old-domain.com/page1.html will be redirected to http://www.new-domain.com/page1.html.
OR
-
- Redirect specified pages:
-
Redirect 301 /old-page-1.html http://www.newdomain.com/new-page-1.html Redirect 301 /old-page-2.html http://www.newdomain.com/new-page-2.html
-
Leave a Reply
You must be logged in to post a comment.