cancel
Showing results for 
Search instead for 
Did you mean: 

Redirect

SOLVED

Redirect

Greetings,
I am changing my domain from .it to .com and while doing so I have 1500 redirects [301, 404, 2xx, etc] I want to set. How can I do so?

 

I alredy know all the old URLs and the new ones.

 

Please and thank you!

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Redirect

Hello @simone_romeo 

 

Yes, performance definitely impact: first it will hit old url and then it will check rule in .htaccess then it will redirect to new url so why we are loading two times. but if you do not want that old users will hit that url and they will redirect then you can follow this. If do not want to loose old customers.

Manish Mittal
https://www.manishmittal.com/

View solution in original post

7 REPLIES 7

Re: Redirect

Hello @simone_romeo 

 

  • Searched whole MySQL database (All tables) for the string www.example.it and made sure there was none that could be causing the Redirection to happen.
  • Updated Database Table core_config_data columns web/unsecure/base_url and web/secure/base_url to the new sites URL www.example.com
  • cleared any Cache files from /var/cache/ in the Magento Root
  • Inspected .htaccess file to make sure it wasn't happening there.
Manish Mittal
https://www.manishmittal.com/

Re: Redirect

Hello @Manish Mittal and thank you for answering!
I was actually wishing to do it via the .htaccess file.

Re: Redirect

Hello @simone_romeo 

 

No problem. Are you still looking for .htaccess answer?

 

Enable mod_rewrite and .htaccess through httpd.conf and then put this code in your .htaccess under DOCUMENT_ROOT directory:

Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} ^www\.siteA\.com$ [NC]
RewriteRule ^1987/title\.html$ http://www.siteB.com/page/title3.html [L,R=301,NC]

 

But I will not recommend that approach because SEO and performance will impact due to this.

Manish Mittal
https://www.manishmittal.com/

Re: Redirect

Thank you @Manish Mittal for this answer. Yes, I'm still searching for this solution.

Are you sure about the SEO and performance backlash? I was sure that it was the best method to mantain the current ranking.

 

Would you care to elaborate a bit, please?

Re: Redirect

Hello @simone_romeo 

 

Yes, performance definitely impact: first it will hit old url and then it will check rule in .htaccess then it will redirect to new url so why we are loading two times. but if you do not want that old users will hit that url and they will redirect then you can follow this. If do not want to loose old customers.

Manish Mittal
https://www.manishmittal.com/

Re: Redirect

Thank you @Manish Mittal

You have been kind and helpful.

Re: Redirect

@simone_romeo 

 

Happy to help you Smiley Happy

 

Manish Mittal
https://www.manishmittal.com/