WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Naveeddil
    Member
    Posted 1 year 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
    IT ALL WORKING PERFECT
    but
    i dont know how to redirect my site to new address so i put in index.php file

    <?php
    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
    Member
    Posted 1 year 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