Title: Moving domain &#8211; Intelligent forwarding script/code help
Last modified: August 19, 2016

---

# Moving domain – Intelligent forwarding script/code help

 *  [iamthechosenone](https://wordpress.org/support/users/iamthechosenone/)
 * (@iamthechosenone)
 * [17 years, 12 months ago](https://wordpress.org/support/topic/moving-domain-inteligant-forwarding-scriptcode-help/)
 * Hello, I have searched everywhere to see if there was anywhere that had the script/
   code that I need, but I couldnt find anything.
    I have a wordpress blog on domain1.
   com/blog/ but I have decided to move it to its own domain, domain2.com
 * Now, I could just do a simple forwarding script so that all visitors were sent
   over to domain2.com, but over 90% of my users come from search engines, so after
   searching for what they want and clicking on the link to my site, they would 
   not want to have to search again on domain2.com.
 * Both blogs will have identical settings and layouts, so I need some kind of script/
   code that I can put on domain1.com to detect the address that the user visited
   and then edit it and forward them. For example, if a user visits domain1.com/
   blog/blahblah/ then they would need to be forwarded to domain2.com/blahblah/
 * Alternatively there might be a way to take the last part of the address and search.
   So a user visiting domain1.com/blog/blahblah/ would be forwarded to domain2.com/?
   s=blahblah
 * If anyone can help or provide a script I would be very very grateful and would
   be happy to offer you free advertising on my blog.
 * Thanks in advance

Viewing 1 replies (of 1 total)

 *  [scribblerguy](https://wordpress.org/support/users/scribblerguy/)
 * (@scribblerguy)
 * [17 years, 12 months ago](https://wordpress.org/support/topic/moving-domain-inteligant-forwarding-scriptcode-help/#post-782887)
 * Just use server-based redirection. For Apache, the [mod_alias documentation](http://httpd.apache.org/docs/1.3/mod/mod_alias.htm)
   covers that. Also, see this [Redirection Guide](http://www.affiliatebeginnersguide.com/domains/redirection.html).

Viewing 1 replies (of 1 total)

The topic ‘Moving domain – Intelligent forwarding script/code help’ is closed to
new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [scribblerguy](https://wordpress.org/support/users/scribblerguy/)
 * Last activity: [17 years, 12 months ago](https://wordpress.org/support/topic/moving-domain-inteligant-forwarding-scriptcode-help/#post-782887)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
