Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

htaccess redirects to maintain traffic from older shop
 
tradiArt
Guru
 
Avatar
Total Posts:  379
Joined:  2008-04-28
 

Hello!

I want to open my magento store but URLs have changed since old store. I don’t want to loose traffic so I have decided to enter some more lines in magento’s htaccess.

First, I want all URLs redirected to WWW:

RewriteCond %{HTTP_HOST} ^mydomain.com
RewriteRule 
(.*) http://www.mydomain.com/$1 [R=301,L]

It works ok.

Then I would like to redirect old pages to new magento pages this way:

Redirect 301 /oldfile.php http://www.mydomain.com/newcategory

But when I add these lines, the page doesn’t load in browser, and there is an error: “Page is not redirecting correctly”.

Any ideas of how can I redirect old pages to new? Your help is really appreciated in advance.

Best regards.

 
Magento Community Magento Community
Magento Community
Magento Community
 
nikefido
Guru
 
Avatar
Total Posts:  481
Joined:  2008-07-11
New Haven, CT
 

Redirect 301 /oldfile.php /newcategory
 
Magento Community Magento Community
Magento Community
Magento Community
 
tradiArt
Guru
 
Avatar
Total Posts:  379
Joined:  2008-04-28
 

Thank you!

But how can I redirect then to homepage? Just adding / ?

In fact I get an 500 error :-(

 
Magento Community Magento Community
Magento Community
Magento Community
 
nikefido
Guru
 
Avatar
Total Posts:  481
Joined:  2008-07-11
New Haven, CT
 

/index.php should do it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
tradiArt
Guru
 
Avatar
Total Posts:  379
Joined:  2008-04-28
 

Sorry, my fault:

I was trying to redirect this:

Redirect 301 /index.php /

But there is no need.

Finally I have configurated everything using the full domain:

Redirect 301 /myoldfile.php http://www.mydomain.com/

Thank you very much for your help.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top