Time2Dine.co.nz is Online Restaurant Booking
 
 New Zealand Restaurants Forum
Restaurant Forum | Contact Time2Dine | Book Online & Save | About Time2Dine

Go Back   New Zealand Restaurants & Food Forum > Search Engine Optimisation > Google
Register

Reply
 
LinkBack Thread Tools
  #1  
Old 17th Oct 05, 01:47 PM
T2DMan's Avatar
Administrator
 
Join Date: Apr 2004
Location: Auckland, New Zealand
Posts: 7,839
T2DMan is on a distinguished road
Default 301 redirects

Per Matt Cutts, Google is good at following 301 redirects, and using them to track old url's to new url's. I recommend them when url's are being changed, not just when you are moving to a new webhost.

http://www.mattcutts.com/blog/moving-to-a-new-web-host/

Quote:
the recommended way to do it is to put a 301 (permanent) redirect on every page on mattcutts.com to point to the corresponding page on someotherdomain.com. If you can map mattcutts.com/url1.html to someotherdomain.com/url1.html, that’s better than doing a redirect just to the root page (that is, from mattcutts.com/url1.html to someotherdomain.com). In the olden days, Googlebot would immediately follow a 301 redirect as soon as it found it. These days, I believe Googlebot sees the 301 and puts the destination url back in the queue, so it gets crawled a little later.
For details regarding ASP check out ASP 301 redirects

Last edited by T2DMan; 6th Dec 05 at 12:58 PM.
Reply With Quote
  #2  
Old 17th Oct 05, 03:59 PM
T2DMan's Avatar
Administrator
 
Join Date: Apr 2004
Location: Auckland, New Zealand
Posts: 7,839
T2DMan is on a distinguished road
Default So how do you do 301 redirects

php code - Without the first line, the redirect becomes the bad 302 redirect

If you are doing it via htaccess, have a look at the following thread - for non www to www 301 redirects

[PHP] if (PHP_VERSION >= '4.3.0')
{
header("Location: $url", 0, 301);
}
else if (SAPI_NAME == 'cgi' OR SAPI_NAME == 'cgi-fcgi')
{
header("Location: $url");
// Call the status header after Location so we are sure to wipe out the 302 header sent by PHP
header('Status: 301 Moved Permanently');
}
else
{
header("Location: $url");
header('HTTP/1.1 301 Moved Permanently');
}
[/PHP]
Reply With Quote
  #3  
Old 20th Jul 06, 03:29 PM
T2DMan's Avatar
Administrator
 
Join Date: Apr 2004
Location: Auckland, New Zealand
Posts: 7,839
T2DMan is on a distinguished road
Default Underscores to dashes

Here is a quick and dirty htaccess to convert underscores to dashes in your url's.

Code:
#Underscore to dashes 
hackRewriteRule ([^_]*)_([^_]*)_([^_]*)_([^_]*)_(.*)\.html$ $1-$2-$3-$4-$5.html [R=301,L] 
RewriteRule ([^_]*)_([^_]*)_([^_]*)_(.*)\.html$ $1-$2-$3-$4.html [R=301,L] 
RewriteRule ([^_]*)_([^_]*)_(.*)\.html$ $1-$2-$3.html [R=301,L] 
RewriteRule ([^_]*)_(.*)\.html$ $1-$2.html [R=301,L]
RewriteCond %{REQUEST_URI} ^// 
RewriteRule /(.*) $1
Reply With Quote
  #4  
Old 21st Nov 06, 09:42 PM
Junior Reviewer
 
Join Date: Jun 2006
Posts: 9
mandar-seo is on a distinguished road
Default

Thanks for the code. Can you give some information about .htaccess.
With regards,
Mandar Thosar
__________________
Offshore Software Development Company expertise in Custom Software Development & Outsourced Product Development
Reply With Quote
  #5  
Old 22nd Nov 06, 10:18 AM
T2DMan's Avatar
Administrator
 
Join Date: Apr 2004
Location: Auckland, New Zealand
Posts: 7,839
T2DMan is on a distinguished road
Default What specific information are you wanting???

I am not giving away links from good pages for such an unspecific request. What is your question, what specific information are you wanting?
Reply With Quote
  #6  
Old 19th Mar 07, 08:45 AM
Junior Reviewer
 
Join Date: Mar 2007
Posts: 2
0AAA is on a distinguished road
Default

Thanks for the info-- I have beenlooking for this for some time as I saw many site's PR get divided. I think with 301 redirect helps to concentrate PR value at the same URL.

Recently --I did a URL Preference with Google for one of my site. Are these two the same?
Sorry --if I am bothering--but I am very ignorant on codes and server management.
Regards
__________________
Amazing India -BIR - PRLD
Reply With Quote
  #7  
Old 19th Mar 07, 09:33 AM
T2DMan's Avatar
Administrator
 
Join Date: Apr 2004
Location: Auckland, New Zealand
Posts: 7,839
T2DMan is on a distinguished road
Default Google url preference v htaccess redirect

Quote:
Originally Posted by 0AAA
Thanks for the info-- I have beenlooking for this for some time as I saw many site's PR get divided. I think with 301 redirect helps to concentrate PR value at the same URL.

Recently --I did a URL Preference with Google for one of my site. Are these two the same?
Sorry --if I am bothering--but I am very ignorant on codes and server management.
Regards
The Google preference only means that you will get one preference showing up on Google results. You will still rather likely have Google PR on the other url. All the links going to that url will not be counting for your website.

I had a strange instance last week where a client gave the Google preference for non www, yet had an htaccess redirecting to the www version. Now you can see why Google calls it a preference. In that case, it would be likely that either Google got rather confused, or it overrode the preference, and just used the www version.

Combining all Google PR and text link votes into one version of the url means you actually get the best. Then you also set the google preference for the same version. Also means you are doing things right for the other search engines as well.
Reply With Quote
  #8  
Old 19th Mar 07, 11:38 AM
Junior Reviewer
 
Join Date: Mar 2007
Posts: 2
0AAA is on a distinguished road
Default

Thanks again-
Actually I have built links without WWW but a bit worried--if other people link it they might unknowingly add WWW.
Anyway--I should not rely on others and should build links myself!
__________________
Amazing India -BIR - PRLD
Reply With Quote
  #9  
Old 15th Oct 08, 12:31 AM
Junior Reviewer
 
Join Date: Oct 2008
Posts: 1
khanshab is on a distinguished road
Default htaccess file information

This is the .htaccess file should be in the DocumentRoot directory for your web site.

The .htaccess file contains two columns. The first column is what you want redirected and the second column is where you want it redirected to.

For example, to redirect an entire web site to another site:

Redirect 301 / http://www.example.com/Example Web Page

Or, to redirect just one page to another page:

Redirect 301 /old-page.shtml http://www.example.com/new-page.shtml

Last edited by T2DMan; 25th May 09 at 08:29 AM.
Reply With Quote
  #10  
Old 25th May 09, 05:58 AM
Junior Reviewer
 
Join Date: May 2009
Posts: 1
seopositive2 is on a distinguished road
Default

So google use this technique also i care about this.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
non www to www 301 redirects T2DMan Google 6 29th May 10 06:38 AM
ASP 301 redirects T2DMan Google 1 4th Aug 06 01:25 PM
index.php to root redirects T2DMan Google 0 1st Jun 06 11:37 AM



Powered by: vBulletin Copyright ©2000 -2012, Jelsoft Enterprises Limited.
Search Engine Friendly URLs by vBSEO 3.2.0
© 2010 Time2Dine