How to Redirect old domain journals to New domain Journals

Hi,

We have two journals under a single OJS installation. Now we have splitted them and moved to new individual domains respectively.

Now, how to redirect the users from

  1. www.olddomain.com/index.php/journal-1 to www.newdomain-1.com/journal-1
  2. www.olddomain.com/index.php/journal-2 to www.newdomain-2.com/journal-2

Any suggestions or .htaccess code to redirect

Thank you.

Create a plain text .htaccess file (where the olddomain.com is located) or if you have add the lines from the example to the top of your existing .htaccess file.

# Enable mod_rewrite
RewriteEngine On

# Redirect matching requests to new domain
RewriteRule ^index.php/journal-1(.*)$ http://www.newdomain-1.com/journal-1$1 [L,R=301]
RewriteRule ^index.php/journal-2(.*)$ http://www.newdomain-2.com/journal-2$1 [L,R=301]

This should work.

Dear @kerimsarigul,

Thank you. It Worked.

To avoid duplicate content and indexing issues, can I delete the old OJS installation? Is it possible to redirect the users who are trying to access the content (from old domain) to new domain.

Thank You.

Yes, you can/must delete the old.

@kerimsarigul

I have uninstalled OJS in the old domain.

As per the .htacess, the two journals are now being redirected to new domains.

But the home page is showing the directory. How should I redirect it to any other website. Or any other way of doing it better.

Thank you

Could you kindly provide me with further details about what you are trying to achieve? I am having difficulty comprehending your request and would appreciate it if you could clarify your intentions.