Ready to get started?Download WordPress


Moved from One server to Another but old Links Redirection (2 posts)

  1. Naveeddil
    Posted 2 years ago #

    Hey Champs,

    i have succesfully moved from site from http://www.imsciences.net/ fun to http://www.hamarafun.com with all the old stuff
    i dont know how to redirect my site to new address so i put in index.php file

    header( 'Location: http://www.hamarafun.com') ;

    and it did the magic by redirecting all the traffic of "/fun" to new address

    all i want is it posibble if someone at old address click a category and it open in new site with new address but same category

    there is something for joomla i used in past but in wordpress can you help please?

  2. pete_398
    Posted 2 years ago #

    An Apache 'mod-rewrite' will do that, so that the URL is 're-written'. Any request for http://www.imsciences.net/fun/ will go to http://www.hamarafun.com

    Here is some code, absolutely no guarantees, ..I'm guesssing ..

    RewriteEngine on
    RewriteCond %{HTTP_HOST} (.*)
    RewriteRule ^/(.*) /www.hamarafun.com/%1/$1

    place the above code in the .htaccess file at http://www.imsciences.net/fun/

Topic Closed

This topic has been closed to new replies.

About this Topic