On Fri, Aug 17, 2012 at 3:35 PM, Tristan <sunnrun...@gmail.com> wrote:
> So, I need to change from somedomain.com to somenewdomain.com
>
> I was thinking of doing this
>
> 1) create an alias to the site somenewdomain.com to point to current server
> 2) run permanent 301 redirect from somedomain.com to somenewdomain.com
>
>
> I was thinking this was a clean safe way to do it so we dont have to run a
> global find replace.
>
> Concerns might be but, I don't know for sure?
>
> 1) SEO
> 2) processing / time / cost for the 301 redirect on any old
> somedomain.comrequests
>
>
> What do you guys think?

    Well, first, you get a 0.2-point deduction for not asking anything
about PHP, but since it's Friday and the folks here are about the most
creative and intelligent bunch of minds on any mailing list (call be
biased, I don't care), you still qualify for a medal.
Congratulations.

    If it were me, and this is an Apache box, I would....

        * Add a ServerAlias somenewdomain.com directive to the
somedomain.com VirtualHost entry
        * Add a mod_rewrite rule to your .htaccess file in the web
root of somedomain.com:

            RewriteEngine On
            RewriteCond %{HTTP_HOST} somedomain\.com$
            RewriteRule ^(.*)$ http://somenewdomain.com/$1 [QSA,L,R=301]

    Remember to modify your rewrite stuff to be compatible with the
present SSL status of the request, and do whatever you need to do with
regard to any subdomains or whatever.


-- 
</Daniel P. Brown>
Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to