Page redirects for old site to new site

Discuss Search Engine Optimization in relation to Joomla! 2.5. This forum will also have discussions on SEF/SEO Joomla! 2.5 extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
alston1977
Joomla! Guru
Joomla! Guru
Posts: 543
Joined: Mon May 30, 2011 1:54 am
Location: Los Angeles, CA
Contact:

Page redirects for old site to new site

Post by alston1977 » Thu Mar 29, 2012 9:21 pm

Hello,
I'm about to launch a site that instead of being the first site to live at this domain, it is the first site that I've created that will replace an old site.

It's for a store that has been around online since around 1999 and when doing a google search for it's products it normally occupies the 1-3rd places in the google search.

I've read about page redirects with joomla but never done them, are there any add-ons or extensions that will do this for me automatically? I'm using for the site joomla 2.5.3 and redshop's most recent version.

Thanks.

sagarmandape
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Apr 02, 2012 7:44 am
Contact:

Re: Page redirects for old site to new site

Post by sagarmandape » Mon Apr 02, 2012 7:53 am

There is a simple way of redirecting pages. You may use .htaccess file to redirect specific pages to new site's pages.

alston1977
Joomla! Guru
Joomla! Guru
Posts: 543
Joined: Mon May 30, 2011 1:54 am
Location: Los Angeles, CA
Contact:

Re: Page redirects for old site to new site

Post by alston1977 » Mon Apr 02, 2012 8:09 pm

Hello Sagarmandape,
Thanks for your response. I was wondering if you could direct me to any good resources on how to format this in the .htaccess file to accomplish this? If you know of any that is, I had heard about this with the .htaccess file but I've not ever done it..

Puhhi
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Wed Mar 21, 2012 6:35 pm

Re: Page redirects for old site to new site

Post by Puhhi » Tue Apr 03, 2012 2:23 pm

use this code inside .htaccess

Code: Select all

RewriteEngine On # Turn on the rewriting engine 

RewriteRule (.*) http://www.yournewdomain.com$1 [R=301,L]

alston1977
Joomla! Guru
Joomla! Guru
Posts: 543
Joined: Mon May 30, 2011 1:54 am
Location: Los Angeles, CA
Contact:

Re: Page redirects for old site to new site

Post by alston1977 » Tue Apr 03, 2012 9:59 pm

Hi Puhhi,
Can you please explain what that code will do?

Does it need to be in a specific place on the .htaccess - top/bottom/middle/etc.?

Is that all I have to do to accomplish this?

Thank you.

MrBeeblebrox
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Tue Mar 27, 2012 4:58 am
Location: Mi Ami, Flor Ida
Contact:

Re: Page redirects for old site to new site

Post by MrBeeblebrox » Wed Apr 04, 2012 12:29 am

Puhhi's code will redirect all requests to your new website. However I do believe it needs to be:

Code: Select all

RewriteEngine On # Turn on the rewriting engine

RewriteRule (.*) http://www.yournewdomain.com/$1 [R=301,L]
The additional slash should make things like http://www.domain.com/hello_world.htm work otherwise it would direct to http://www.domain.comhello_world.htm

This code needs to be added to an .htaccess file for it to work or the main server config file.

There is another way to do it. You'll need to do a two fold method i would say.

One install a meta refresh:

Code: Select all

<meta http-equiv="refresh" content="2;url=http://www.yoursite.com/newpage.htm" />
Secondly you want to do a rel canonical

Code: Select all

<link rel="canonical" href="http://www.yoursite.com/newpage.htm"/>
These last two things are honestly less than ideal, you should really be hard redirecting your website using 301 redirects as mentioned before.

Check out Matt Cutts's video on the difference between rel canonical and 301 redirects: http://www.[youtube].com/watch?v=zW5UL3lzBOA

great stuff by master cutts.

You should expect to drop in search after the swap. The fastest way to recover is to keep adding content, keep up your social media presence and backlink velocity. That will show Google that you aren't trying something fishy.
http://www.uglymedia.com - Custom web design and development

Puhhi
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Wed Mar 21, 2012 6:35 pm

Re: Page redirects for old site to new site

Post by Puhhi » Wed Apr 04, 2012 9:24 am

alston1977 wrote:Hi Puhhi,
Can you please explain what that code will do?

Does it need to be in a specific place on the .htaccess - top/bottom/middle/etc.?

Is that all I have to do to accomplish this?

Thank you.
this code needs to be inserted into .htaccess just copy and paste it(change to your new site URL, this is where it will redirect your visitors), nobody can feel the redirection.

place it to top if you have any other things there, but rewrite engine: on. needs to be in first line (declared only once)

LondonJoe
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Tue Oct 06, 2009 8:33 am

Re: Page redirects for old site to new site

Post by LondonJoe » Wed Apr 04, 2012 4:03 pm

I just want to double-check: Has the domain name changed, or are you installing the new site on the same domain name?

alston1977
Joomla! Guru
Joomla! Guru
Posts: 543
Joined: Mon May 30, 2011 1:54 am
Location: Los Angeles, CA
Contact:

Re: Page redirects for old site to new site

Post by alston1977 » Wed Apr 04, 2012 7:38 pm

Thanks for the information, I really appreciate it!

The site's domain will stay the same once it's launched and will replace the old website that is currently at this url.

Is it then necessary to do this type of redirect since visitors will be entering the same "http://www.domainname.com" when going to the site?

Currently I had this at the top of my .htaccess:
"# compress all text & html:
AddOutputFilterByType DEFLATE text/html text/plain text/xml"

This was to allow for gzip compression to speed up download times. The line "RewriteEngine On" was on line 25 but should it be the very first line of .htaccess?

Puhhi
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Wed Mar 21, 2012 6:35 pm

Re: Page redirects for old site to new site

Post by Puhhi » Thu Apr 05, 2012 7:56 am

alston1977 wrote: The line "RewriteEngine On" was on line 25 but should it be the very first line of .htaccess?
The redirection line may not work if the rewrite engine is off, as long as it's before the redirection line it should work.
Please read forum rules regarding signatures: http://forum.joomla.org/viewtopic.php?t=65

LondonJoe
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Tue Oct 06, 2009 8:33 am

Re: Page redirects for old site to new site

Post by LondonJoe » Thu Apr 05, 2012 8:05 am

The redirection specified above isn't going to help you, as it would be for redirecting a page to the same location on a different domain, if I'm not mistaken

You need something like

RewriteCond %{REQUEST_URI} ^/old_page_location$
RewriteRule ^(.*) http://www.yourdomain.com/new_page_location? [L,R=301]

for each page that will have a new address

alston1977
Joomla! Guru
Joomla! Guru
Posts: 543
Joined: Mon May 30, 2011 1:54 am
Location: Los Angeles, CA
Contact:

Re: Page redirects for old site to new site

Post by alston1977 » Tue Apr 10, 2012 7:27 pm

Thanks guys, so for example, this site (the old site) has it's home page and then all other pages are for product pages. I've taken an example of the old site's url vs. the new sites url:

this is the old page address for a product:
".com/cgi-bin/webc.cgi/st_prod.html?p_prodid=15263"

this is the new page address for a product:
".com/magic-dvds/7-dvd-s/15263/P224-howard-hamburg-sessions-dvd"

So would my page redirect be something like this:

RewriteCond %{REQUEST_URI} ^/cgi-bin/webc.cgi/st_prod.html?p_prodid=15263
RewriteRule ^(.*) http://www.domain.com/magic-dvds/7-dvd- ... ssions-dvd? [L,R=301]

Then, since each product would have it's own page extension, I should do one for each product? Also, is this redirect to help google's searchbot to include my new pages in the search at (hopefully) the same level of importance/ranking as they are in the old site?

aaanativearts
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 203
Joined: Fri Aug 04, 2006 12:38 pm

Re: Page redirects for old site to new site

Post by aaanativearts » Wed Apr 11, 2012 6:06 am

If the redirects are in place immediately when the new site goes live (ie you already have them in your .htacces file ready to upload with the new site), then in theory the page rank you had on the old page that was exactly the same, except for the new path, should pass to the equivelent page on the new site. In actuality, it does help a great deal, but you might still see a slight drop in your rankings for a short time.

If, however, you change to the new site, and then attempt to do the redirects at some later time, it will probably be too late to help much with search engine positioning. Once google has indexed the new pages at their new location, it is my understanding it is already too late to preserve your page rank from the old pages with a redirect after that. But it would still preserve any backlinks you already have on other sites if you get the redirects in place before someone clicks that link on a particular site or the webmaster discovers the link is broken and removes it.

LondonJoe
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Tue Oct 06, 2009 8:33 am

Re: Page redirects for old site to new site

Post by LondonJoe » Wed Apr 11, 2012 8:20 am

Hmm, I'm suspecting this redirect isn't going to work without some modification - its the "?p_prodid=15263" bit that I think needs to be handled differently. This is the limit of my knowledge though, so unless someone else here knows how this is done you might need to hunt through some htaccess tutorials.

grbrains
Joomla! Intern
Joomla! Intern
Posts: 86
Joined: Tue Jun 14, 2011 6:49 am
Location: Ahmedabad, India
Contact:

Re: Page redirects for old site to new site

Post by grbrains » Thu Apr 12, 2012 11:16 am

Try this it works,

RewriteCond %{REQUEST_URI} ^/oldpage$
RewriteRule ^(.*) http://www.newdomain.com/new_page_location? [L,R=301]


Locked

Return to “Search Engine Optimization (Joomla! SEO) in Joomla! 2.5”