Get exclusive CAP network offers from top brands

View CAP Offers

google and Redirects

[bsa_pro_ad_space id=2]
  • This topic is empty.
Viewing 15 posts - 1 through 15 (of 23 total)
  • Author
    Posts
  • #588953
    Anonymous
    Inactive

    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

    #667227
    Anonymous
    Inactive

    using mod rewrite so all links contain the www version this code is placed in your htaccess file Not all servers/hosts allow you to use mod rewrite:

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

    OR simply add this line which tells anyone grabbing the other page it has moved permanently to the http://www.yoursite.com

    redirect 301 yoursite.com http://www.yoursite.com

    #667613
    Anonymous
    Inactive

    Thanks DivaG

    That worked perfectly for the redirecting the non-www to the www, but how do I get these files:

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

    to simply redirect to:

    http://www.mysite.com

    ?

    Best regards,
    Bernie

    #667921
    Anonymous
    Inactive

    I am still very interested in knowing the answer to this if anyone knows… again my prediciment is that I have several pages that are the same page, and I would like them to redirect to the ONE correct page.

    they are:

    index.php
    index.php?page=1

    I would like these to re-direct to my “www.sitename.com” page

    Can anyone help me do this through .htaccess?

    also I have a few pages like blackhawk.htm that are PR6 and I need to redirect them to a different page – is it best to put a link on the PR6 page to pass the PR? or will another redirect through .htaccess accomplish the same thing seamlessly?

    thanks much
    Any help with these technical problems appreciate.

    Thanks,Bernie

    #667925
    Anonymous
    Inactive

    is it best to put a link on the PR6 page to pass the PR? or will another redirect through .htaccess accomplish the same thing seamlessly?

    If you use .htaccess or a 301 Permanent Redirect, 100% of the PR should be transferred (and yes, it’s seamless). A 301 Permanent Redirect is quite easy to use — after you move the old page to the new URL, delete all of the code on the old page and replace it with this:

    [HTML] header(“HTTP/1.1 301 Moved Permanently”);
    header(“Location: http://www.yoursite.com/newpage.php”);
    exit();
    ?>[/HTML]Make sure there aren’t any spaces before the . Hold down the delete key to make sure there aren’t any hard returns or spaces, otherwise the redirect may not work right.

    I don’t think you could use a 301 redirect on index.php or index.php?page=1, since these pages are the same as the home page of http://www.yoursite.com. I don’t know what would happen if you redirected a page to itself — I guess it would create an infinite loop.

    I am not very familiar with .htaccess, but I do believe some kind of .htaccess code will end up being the solution here. I know it is possible to use .htaccess to rewrite URLs so that the “?” in the URL is replaced with a forward slash (some people do this for SEO reasons). You can also shorten dynamic URLs this way. Here is a page that might give you a few ideas.

    Does anyone else have ideas on how to solve this problem?

    #667953
    Anonymous
    Inactive

    Thanks Dave,

    I have done this and it works for redirecting.

    Best regards,
    Bernie

    edited to remove stupid question

    #667961
    Anonymous
    Inactive
    blackhawk wrote:
    I have done this and it works for redirecting.Great! Did you end up using .htaccess to make index.php and index.php?page=1 redirect to xwww.yoursite.com?
    #668028
    Anonymous
    Inactive
    Quote:
    Great! Did you end up using .htaccess to make index.php and index.php?page=1 redirect to xwww.yoursite.com?

    No that part I didn’t figure out yet… Was talking about redirecting:

    Quote:
    If you use .htaccess or a 301 Permanent Redirect, 100% of the PR should be transferred (and yes, it’s seamless). A 301 Permanent Redirect is quite easy to use — after you move the old page to the new URL, delete all of the code on the old page and replace it with this:

    Now I really have to figure out the other trick. I have php files that include .htm files…. both are ranking in the engines – but when the .htm files show up, there is no CSS style sheets,etc… applied because it is just pulling the guts of the page. How to make someone who calls thispage.htm, load thispage.php?

    Thanks,
    Bernie

    #668642
    Anonymous
    Inactive

    You can use htaccess or mod rewrites to force a page to equal a specific page. You can point any virtual page name or long dynamic page url to a simplified version which is actually virtual.

    AS long as it is a permanent redirect – 301
    AND you are NOT trying to link stuff by having the virtual links like this domain.com?page=2 domain.com?page=3 in your pages there should not be a looping problem for users or bots.

    There are cleaner ways do do this at the server level but it depends on your server flavor and what you want to accomplish.

    additional resources:
    CAP Spring Break Notes

    #668645
    Anonymous
    Inactive

    Thank you, Ginette! I hope you are well!

    #668836
    Anonymous
    Inactive

    http://www.google.com/remove.html#exclude_pages

    To remove dynamically generated pages, you’d use this robots.txt entry:

    User-agent: Googlebot
    Disallow: /*?

    #669381
    Anonymous
    Inactive

    Dang, guys.

    Still having trouble with this can someone give me an idiots example of how to redirect this file:

    index.cfm?var_file=cripcdir.htm

    to this file:

    cripple.php

    Thanks much in advance!

    #669384
    Anonymous
    Inactive
    #669400
    Anonymous
    Inactive

    thanks VD — and I have looked at that voodoo for some time and gone crosseyed.

    can you clear this up for me. when I think of mod-rewrite I think of this thing some programmers did for me that turns pages like:

    xwww.gamblingforum.com/forum/viewtopic.php?posid=32&SESSION=3243242
    to something more readable like this
    xwww.gamblingforum.com/forum/post2.html

    this is not what I’m doing here…. I am actually trying to redirect to a new page that is completely different page. (not the same page rewritten)

    do I still look where the link points me? :) — sorry, if I look at that for four hours and find out it doesn’t work, I’ll be sad … can you shed just a wee bit more light?

    #669408
    Anonymous
    Inactive
Viewing 15 posts - 1 through 15 (of 23 total)