| Google Forum Discuss Google related issues. |
10-28-2003, 05:01 AM
|
#1 (permalink)
|
|
Inactive
Join Date: 10-26-03
Posts: 2,466
Latest Blog: None
|
Server side solutions to prevent PR split?
Got a situation - out of my hands - where a certain index page is being linked to by more than one different URL.
ie,
http://domain.com
http://www.domain.com/index.php
http://www.domain.com
I'd like to be able to solve this issue, so that all the URLs are directing to just the last example URL structure.
Is there an actual server side solution - ie, .htaccess or mod_rewrite - where the URLs can be changed, and transfer the PR to the proper URL?
|
|
|
10-28-2003, 05:07 AM
|
#2 (permalink)
|
|
Banned
Join Date: 10-13-03
Posts: 213
Latest Blog: None
|
The external links themselves are located on servers you have no control over.
IMO there is no necessity for a search engine to see where the link goes to in order assigning credit for it, and thus I can see no way that redirects are going to solve the problem.
In other words a link to http://www.someplace.com is a link to someplace.com even if the searcher actually ends up at another page.
|
|
|
10-28-2003, 05:36 AM
|
#3 (permalink)
|
|
Crap Bag
Join Date: 10-12-03
Posts: 1,727
Latest Blog: None
|
As Mel said, the URLs exist and pages are returned when they are requested, so you can't do anything about that end of it other than ask the linkers to change the URLs.
The biggest PR split occurs with the 2 versions of the domain URL (not the index.php version). To minimise the split, make all of the links on the index page absolute - full URLs including the protocol (http://). That way, spiders will find only the IBLs URL for the domain without the "www." instead of 2 complete sites, and the PR from the www.less links will spread through the www site.
Also, don't have any links within the site that point to the home page's pagename (index.php). Use only the domain URL or "/". That way, the domain URL is receiving all of the home page's IBLs, except those without the www from other sites.
|
|
|
10-28-2003, 06:04 AM
|
#4 (permalink)
|
|
Inactive
Join Date: 10-26-03
Posts: 2,466
Latest Blog: None
|
I suspected as much - still, worth asking. Thanks for the replies, folks.
|
|
|
10-28-2003, 10:30 AM
|
#5 (permalink)
|
|
Inactive
Join Date: 10-17-03
Posts: 51
Latest Blog: None
|
well , the one solution I use is to use mod_rewrite to convert all links to canonical form. This way, user or spider requesting site.com would get 302 www.site.com and PR will get transferred. I am not sure at which stage PR is assigned, but after using this for a few years on a site with many inbound links created by users which I never asked for links (so they are coming in all forms) I just checked and I got PR0 on domain.com and PR6 on www.domain.com, so I guess it works fine. Oh, and absolute links or a <base href= is a must, too.
If you need the code, let me know. It's trivial really.
|
|
|
10-28-2003, 10:45 AM
|
#6 (permalink)
|
|
Crap Bag
Join Date: 10-12-03
Posts: 1,727
Latest Blog: None
|
A while back it was reported that people were experiencing problems when returning a 302 to Google (Google wasn't handling it correctly), but it's not that important in this case.
I'm not convinced that Google will transfer PR votes from a 302ed URL to the forwarded URL but it might be worth a try.
|
|
|
10-28-2003, 10:54 AM
|
#7 (permalink)
|
|
Inactive
Join Date: 10-17-03
Posts: 51
Latest Blog: None
|
i have done 302 transfers of .html sites to .php and it worked fine (pr was kept after the serps update), so I think google honors the code.
|
|
|
10-28-2003, 11:23 AM
|
#8 (permalink)
|
|
Crap Bag
Join Date: 10-12-03
Posts: 1,727
Latest Blog: None
|
That's very interesting. I've always shied away from trusting to 302s because of what was said - but it was quite some time ago.
|
|
|
10-29-2003, 01:49 PM
|
#9 (permalink)
|
|
Inactive
Join Date: 10-26-03
Posts: 2,466
Latest Blog: None
|
I think I heard that PR is transferred through 301s.
But, frankly, rediercts is an area I know nothing about.
I'll be happy to try a 302 or 301 method if someone gives instructions. I've nothing to lose - the PR is already split.
|
|
|
10-29-2003, 03:43 PM
|
#10 (permalink)
|
|
Inactive
Join Date: 10-17-03
Posts: 51
Latest Blog: None
|
put something like that in your httpd.conf (or .htaccess file if on shared hosting):
FollowSymlinks On
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com$ [NC]
RewriteRule ^(.*) http://www.yourdomain.com$1 [R=permanent]
replace yourdomain obviously.
|
|
|
10-29-2003, 04:19 PM
|
#11 (permalink)
|
|
Crap Bag
Join Date: 10-12-03
Posts: 1,727
Latest Blog: None
|
For that to work, the site needs to be on an Apache server which has mod_rewrite installed.
|
|
|
10-29-2003, 04:43 PM
|
#12 (permalink)
|
|
Inactive
Join Date: 10-17-03
Posts: 51
Latest Blog: None
|
right; you would know whether you have mod_rewrite if this would work :)
You can also add a
RewriteRule ^/index.html$ http://www.yourdomain.com/ [R=permanent]
or the other way around
RewriteRule ^/$ http://www.yourdomain.com/index.html [R=permanent]
depending on the desired behaviour (hide or show index.html)
|
|
|
10-30-2003, 12:40 AM
|
#13 (permalink)
|
|
Inactive
Join Date: 10-26-03
Posts: 2,466
Latest Blog: None
|
If I may just check, the .htaccess file in question here should be in the folder where the issues is? It is not actually the root folder. I've applied .htaccess with mod_rewrite before for converting URLs to .php from .htm, but I really don;t know the field.
And to redirect from "/" to "/index.php" I should therefore use:
[code:1:0b4da39d46]
FollowSymlinks On
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com$ [NC]
RewriteRule ^(.*) http://www.yourdomain.com$1 [R=permanent]
RewriteRule ^/index.html$ http://www.yourdomain.com/ [R=permanent]
[/code:1:0b4da39d46]
yes?
Much appreciated, btw, piramida - server issues are normally a little beyond myself.
|
|
|
10-30-2003, 07:20 AM
|
#14 (permalink)
|
|
Inactive
Join Date: 10-17-03
Posts: 51
Latest Blog: None
|
No, to rewrite from / to index.php you change last line to
[code:1:f3efa68fe3]
RewriteRule ^/$ http://www.yourdomain.com/index.php [R=permanent]
[/code:1:f3efa68fe3]
the other two lines (rewritecond+rewriterule) are to make domain canonical (i.e., redirect domain.com/anything -> www.domain.com/anything).
and yes, you would put that in .htaccess that is in your domain's documentroot.
np.
|
|
|
10-30-2003, 02:34 PM
|
#15 (permalink)
|
|
Inactive
Join Date: 10-26-03
Posts: 2,466
Latest Blog: None
|
Whoah! 500 error.
[code:1:bc75f1ca62]
FollowSymlinks On
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.comparative-religion\.com$ [NC]
RewriteRule ^(.*) http://www.comparative-religion.com$1 [R=permanent]
RewriteRule ^/$ http://www.comparative-religion.com/forum/index.php [R=permanent]
[/code:1:bc75f1ca62]
|
|
|
10-30-2003, 02:50 PM
|
#16 (permalink)
|
|
v7n Mentor
Join Date: 10-13-03
Location: Central Ohio (Dublin)
Posts: 1,519
Latest Blog: None
|
I've used:
[code:1:0d590f69a8]redirect 301 /games/zoo_tycoon-tips.shtml http://www.cnwcentral.com/zoo-tycoon/tips-hints.shtml[/code:1:0d590f69a8]
in my HTACESS file and it seems to work, it redirects.
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 07:51 PM.
© Copyright 2008 V7 Inc
|