wordpress - Redirect subdirectory of old domain to root folder of new domain via htaccess -


i have gone through several domain iterations on wordpress blog , want old links redirected new domain. blog in

olddomain.com/blog/ 

now blog @ root level of

 newdomain.com 

the old domain set domain alias of new domain, not forwarded.

if visits site

 olddomain.com/blog/ 

i need redirect

 newdomain.com/ 

thanks help.

  1. just create .htaccess file , put in folder want redirect e.g put in /blog folder.

  2. add following lines .htaccess file.

    rewriteengine on

    rewritecond %{server_port} 80

    rewritecond %{request_uri} blog

    rewriterule ^(.*)$ http://www.newside.com/newblog/$1 [r,l]


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -