Grow your CSS skills. Land your dream job.

.htaccess Urgent help needed please

  • # April 11, 2009 at 2:07 pm

    I need to move one wordpress site to another domain.

    Both domains will be pointed to the same nameserver, ie. they are both working on the same folder and have the same root.

    I need a .htaccess file that moves http://olddomain.com/testcategory/ to http://newdomain.com/testcategory/ for example.

    So the only thing that is different is the domain. If somebody clicked a page from an old link on another site to the old link they will be redirected to the new domain but the URL will still be intact.

    Does this make any sence?

    Any help would be much appreciated.

    # April 11, 2009 at 11:26 pm

    Jeff Starr has a pretty comprehensive .htaccess guide:

    http://perishablepress.com/press/2006/0 … ss-tricks/

    There is definitely information in there on that.

    # April 12, 2009 at 4:19 pm

    Thanks apostrophe and chris.

    I ended up using

    Code:

    after pointing the original domain to a new fonder wit the .htaccess mentioned above.



    On a similar note, you could do a screencast about this back end server stuff, like useful tips or something, providing you know what I mean.

    # April 24, 2009 at 3:55 pm

    I found a more comprehensive code.

    Code:
    RewriteEngine on

    RewriteCond %{HTTP_HOST} ^domain2.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.domain1.com$
    RewriteRule ^(.*)$ “http://www.domain2.com/$1″ [R=301,L]

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".