Wordpress blog URL redirect -


two questions only:

  1. i have website including section of blog in wordpress. requirements changed , client wants me make blog section on different domain. wants website , blog on different domains. yesterday setup blog on different server problem when click on post takes me post on old domain. idea how can fix issue?

  2. also have sent out many newsletters our customers in have posted urls of old domain. possible redirect them post on new domain , process?

i appreciate if give me articles or tutorial links can me in not php guy.

that's interesting stuff, here's how should proceed -

solution first question replace old domain new 1 in mysql dump file. before proceed, please take backup of database, in case mess around. solution works best, since transfer client's websites devserver live servers ever & then. follow these steps -

  1. open new hosting's cpanel or dump mysql file using mysqldump command shell
  2. open dump file in favorite text editor , find "http://old_domain.com" , replace "http://new_domain.com" , replace meta entries,post entries etc. save htis file.
  3. truncate database tables of new domain's database (do not worry, have backup)
  4. import sql file saved in step 2, , done!

solution second question setup .htaccess redirect. sure using apache server, cause :) , it's pretty easy setup .htaccess redirect using can redirect visitors visiting old website new website url. used following code on blog few years back, , have blogpost on how setup apache redirect new domain, in case want know more it.

rewritecond %{http_host} ^.*old_domain\.com$ [nc] rewriterule ^(.*)$ http://www.new_domain.com/$1 [r=301,l] 

do let me know if unclear, try clarify it.

cheers,

sachin khosla


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -