Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- Redirect using Redirectmatch and wildcards


jdMorgan - 8:46 pm on Dec 11, 2008 (gmt 0)


No, I think not. The expression on the left side can include only the local URL-path, not the domain. Therefore mod_alias directives cannot do what you appear to want to do here. Use mod_rewrite:

RewriteCond %{HTTP_HOST} ^([^.]+\.)?old-domain\.com
RewriteRule (.*) http://%1new-domain.com/$1 [R=301,L]

This assumes that you've got other working mod_rewrite code, and so have the required 'set-up' directives (Options +FollowSymLinks" and "RewriteEngine on") in your file.

Jim


Thread source:: http://www.webmasterworld.com/apache/3805443.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com