Get exclusive CAP network offers from top brands

View CAP Offers

google and Redirects

blackhawk asked 3 years ago
Ok, there was a thread – sorry I couldn’t find it – about 301 redirects to insure that your home page PR is not split. Basically this is the

http://www.yoursite.com vs yoursite.com (no www)

I have a few questions about this, on my site all of the following are the same page:

http://www.yoursite.com
yoursite.com
yoursite.com/index.php
yoursite.com/index.php?page=1

Could this potentially mean that my PR could get divided by FOUR instead of TWO? and if so, can someone help me with an .htaccess file that will make everything direct to the http://www.yoursite.com ?

Best regards,
Bernie

22 Answers
vd752 answered 3 years ago
In the head section of the index.cfm
page, work for me, not sure for Cold Fusion (and SE’s)
redirects only “index.html?anykey” index.html is not affected.

wufu110 answered 3 years ago
blackhawk wrote:
That looks very interesting. I can’t understand it exactly … but where do I install this script? I would love to see something work.

So where to install?
Thanks!

In the head section of the page you are trying to redirect, I believe…

blackhawk answered 3 years ago
That looks very interesting. I can’t understand it exactly … but where do I install this script? I would love to see something work.

So where to install?
Thanks!

vd752 answered 3 years ago
JavaScript?





blackhawk answered 3 years ago
Thanks blackjackinfo… I tried something like that (and just now tried exactly that), but neither work

Thanks though!
Bernie

BlackjackInfo answered 3 years ago
Although I know almost nothing about Cold Fusion, you should be able to test the value of the parameter sent to the page, and do the redirect only if var_file = cripcdir.htm

As for the mod_rewrite solution, I’ll offer this, without testing:

RewriteEngine on
RedirectMatch (.*)/index.cfm?var_file=cripcdir.htm http://www.yourhost.com/cripple.php

The idea is that the first gobbly-gook will match only the exact URL http://www.yourhost.com/index.cfm?var_file=cripcdir.htm
The backslashes are necessary before any special characters.

blackhawk answered 3 years ago
Redirect in ColdFusion
<.cfheader statuscode="301" statustext="Moved permanently">
<.cfheader name="Location" value="http://www.new-url.com">

The above won’t work for me because the problem I am having is:

while index.cfm is a real page,
index.cfm?var_file=cripcdir.htm – isn’t a real page.

Basically the whole site is index.cfm… the variables tell the coldfusion page what data to load – kind of like a php include file… so the file: index.cfm?var_file=cripcdir.htm actually represents different content than index.cfm

am i making since here?

webber286 answered 3 years ago
Just took a look, and our http://www.domain.com has a different PR than the http://domain.com. Was wondering if anyone had done this fix and actually seen an improvement to their PR because of it?

And, does anyone know how to do this if you are on a MS Server? No .htaccess for me.

vd752 answered 3 years ago