Printer Friendly Version Print this thread
Email this thread to a friend eMail this thread to a friend
  • Quick way to the top of a Y! Directory Category! (In: Yahoo!)
  • Featured Web Site Template

    Hundreds More at Free Site Templates.com!

    Web Site Partners
    Sponsored Links
    Jet City Software
     
    Whos Here ?
    Reflects user activity within the last 5 minutes
    Moderator(s): g1smd, Logan
    Member Message

    mark_battista
    Joined: Mar 07, 2006
    # Posts: 31

    View the profile for mark_battista Send mark_battista a private message

    Posted: 2006-Nov-10 10:06
    Edit Message Delete Message Reply to this message

    Hi
    I just wanted to pick someones brain, I am thinking of changing a sub directory name eg, from **/hand-tufted-rugs to **/modern-rugs because there are more searches in google for the latter and I feel it well help my rankings for this keyword. Two questions really, will it make a difference and what will happen to all those pages that are currently listed in google under the old url? There are quite a lot of them. Would it be a good idea to set up some sort of redirect for that url and if so how would I go about doing it? I already have a 301 redirect for domain.com to www.domain.com. Ooops I think I've asked four questions not two. Any help is gratefully received. I've just had an idea what if I created a copy of the old directory and pasted it all into the new directory and told google robots not to index not to index the old directory through the robot.txt file? Would this still be classed as duplicate content?

    [ Message was edited by: mark_battista 11/10/2006 03:51 am ]





    Logan
    Joined: Aug 14, 2002
    # Posts: 3749

    View the profile for Logan Send Logan a private message

    Posted: 2006-Nov-10 13:51
    Edit Message Delete Message Reply to this message

    if it helps isn't based on the directory name alone, but other factors as well. Sure the keywords within the directory or file name can be beneficial, at the same time I have never had an issue ranking a page without the keyword included in domain, directory or file name.

    Regarding how, if you proceed you should use a 301 redirect. The search engines will recognize this and thus an issue of duplicate content is not a problem.



    g1smd
    Staff
    Joined: Jul 28, 2002
    # Posts: 10438

    View the profile for g1smd Send g1smd a private message

    Posted: 2006-Nov-11 00:25
    Edit Message Delete Message Reply to this message

    The 301 redirect from the old folder to the new folder is crucial here, because Google will hold on to, and show, the old URL for very many months after you change your site.

    You want for all visitors that click on that old URL whenever it appears in the SERPs to be seamlessly and silently delivered to the correct new URL with the minimum of fuss.


    This code should be what you need:

    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /rugs/whatever/hand-tufted-rugs.*\ HTTP/
    RewriteRule ^(([^/]*/)*)hand-tufted-rugs(.*)$ http://www.yourwebsite.com/$1modern-rugs$3 [R=301,L]

    The first line must contain the full path to the required folder.

    The new code must also go before your non-www to www redirect as this new redirect is a special case. The output of the new redirect is already forced to be www and putting this new code first avoids a redirection chain.


    Nothing extra is required in robots.txt, the redirect already says that the content has moved. You do not want to exclude bots from seeing that redirect.



    mark_battista
    Joined: Mar 07, 2006
    # Posts: 31

    View the profile for mark_battista Send mark_battista a private message

    Posted: 2006-Nov-14 09:33
    Edit Message Delete Message Reply to this message

    Thank you, that is an excellent reply, so if I use the code above exactly as shown but change the /rugs/whatever/hand-tufted-rugs to my actual directory and the url in the second line to my new directory it will work? A couple of questions do I need the full url in the first line i.e. http://www/mysite/directory
    These ar ethe only things I edit?

    Thank you



    g1smd
    Staff
    Joined: Jul 28, 2002
    # Posts: 10438

    View the profile for g1smd Send g1smd a private message

    Posted: 2006-Nov-14 10:14
    Edit Message Delete Message Reply to this message

    The first line needs the folder path in the format as shown.

    The second line needs only the folder names, both old and new.




    mark_battista
    Joined: Mar 07, 2006
    # Posts: 31

    View the profile for mark_battista Send mark_battista a private message

    Posted: 2006-Nov-14 14:09
    Edit Message Delete Message Reply to this message

    Thank you I have rewritten the code as

    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /hand-tufted-rugs.*\ HTTP/
    RewriteRule ^(([^/]*/)*)hand-tufted-rugs(.*)$ http://www.mysite.com/$1modern-rugs$3 [R=301,L]

    Should this work? Baring in mind that my original directory was //www.mydomain.com/hand-tufted-rugs/ and my new directory is
    //www.mydomain.com/modern-rugs/
    Sorry to be a pain

    [ Message was edited by: mark_battista 11/14/2006 07:14 am ]



    [ Message was edited by: mark_battista 11/14/2006 10:43 am ]



    [ Message was edited by: mark_battista 11/14/2006 10:46 am ]





    g1smd
    Staff
    Joined: Jul 28, 2002
    # Posts: 10438

    View the profile for g1smd Send g1smd a private message

    Posted: 2006-Nov-14 15:53
    Edit Message Delete Message Reply to this message

    The forum has removed your \ tags, so I cannot see if it is right or not.

    You need to put a \\ in your code for them to be visible here.

    Edit your post above until it LOOKS right in the PUBLIC view of the thread. Every character (including spaces) is important.

    There are two separate lines of code for the rewrite. They start with:

    RewriteCond ... and
    RewriteRule ...



    mark_battista
    Joined: Mar 07, 2006
    # Posts: 31

    View the profile for mark_battista Send mark_battista a private message

    Posted: 2006-Nov-14 17:03
    Edit Message Delete Message Reply to this message

    pmed you



    Edit the code in the post above until it reflects what you actually have.

    [ Message was edited by: g1smd 11/14/2006 09:23 am ]

    Ok the code above is what i have exactly

    [ Message was edited by: mark_battista 11/14/2006 11:06 am ]





    mark_battista
    Joined: Mar 07, 2006
    # Posts: 31

    View the profile for mark_battista Send mark_battista a private message

    Posted: 2006-Nov-14 19:07
    Edit Message Delete Message Reply to this message

    ok code re-edited to show exactly what I have
    Looks like I need a massive amount of help, I can't get this to work and I reckon my boss is gonna kill me

    [ Message was edited by: mark_battista 11/14/2006 11:44 am ]





    g1smd
    Staff
    Joined: Jul 28, 2002
    # Posts: 10438

    View the profile for g1smd Send g1smd a private message

    Posted: 2006-Nov-14 21:26
    Edit Message Delete Message Reply to this message

    That code should work as is. I acnnot see any errors.

    If the folder to be redirected is already directly in the root, then you could get away with this instead:

    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /hand-tufted-rugs.*\ HTTP/
    RewriteRule ^/hand-tufted-rugs(.*)$ http://www.yourwebsite.com/modern-rugs$1 [R=301,L]

    This redirect needs to go BEFORE the non-www to www redirect that you already have.


    Get the Mozilla or Firefox web browser and install the Live HTTP Headers extension, and you will soon see what is going on.



    mark_battista
    Joined: Mar 07, 2006
    # Posts: 31

    View the profile for mark_battista Send mark_battista a private message

    Posted: 2006-Nov-14 22:22
    Edit Message Delete Message Reply to this message

    Hi thank you for your help, sorry i'm so stupid i've never realy done anything like this before
    when i run liveheaders i get this, what doeis it mean:

    [link]

    GET /hand-tufted-rugs/Cato/index.html HTTP/1.1
    Host: www.rugsuk.com
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.8) Gecko/20061025 Firefox/1.5.0.8
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: en-gb,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive

    HTTP/1.x 302 Found
    Transfer-Encoding: chunked
    Date: Tue, 14 Nov 2006 22:18:56 GMT
    Server: Apache
    Location: [link]
    --------------: ---
    Keep-Alive: timeout=15, max=500
    Connection: Keep-Alive
    Content-Type: text/html; charset=iso-8859-1



    g1smd
    Staff
    Joined: Jul 28, 2002
    # Posts: 10438

    View the profile for g1smd Send g1smd a private message

    Posted: 2006-Nov-14 23:40
    Edit Message Delete Message Reply to this message

    It means that the URL wasn't even found... I can also see that the printout exposes several other errors on your site.



    Your "Page not found" message is returning a 302 status and that is a disaster. It MUST return a 404 status code.


    You are calling for an index page by its name. That is another form of duplicate content. You should omit the index file filename from every link that calls for an index, and just end the link with a trailing / on the end of the URL.


    The code posted above should work. I pulled it from a live server where it was installed, and just changed the folder names.



    mark_battista
    Joined: Mar 07, 2006
    # Posts: 31

    View the profile for mark_battista Send mark_battista a private message

    Posted: 2006-Nov-15 09:25
    Edit Message Delete Message Reply to this message

    Nightmare, thank you fo rall your help, I'm going to rename the folder back to what it was originally as I just can't seem to figure this out wink
    Thanks again



    mark_battista
    Joined: Mar 07, 2006
    # Posts: 31

    View the profile for mark_battista Send mark_battista a private message

    Posted: 2006-Nov-15 12:52
    Edit Message Delete Message Reply to this message

    just out of i nterest, I have now put the old folder back so everything works, but how do I fix the custom 404 page returning a 302 problem?


    You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
    1. You have not yet logged in, or registered properly as a member
    2. You are a member, but no longer have posting rights.
    3. This is a private forum, for which you do not have permissions.

    If you are a recent member, it's possible that you simply have not yet confirmed your account. Please check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions contained within.

    If you cannot find this message, click here to Re-Send it.

    If you are still experiencing problem, please read the Login Assistance Article for some advice on what may be causing your login not to work properly.

    Switch to Advanced Editor and ... Create a New Topic or Reply to this Thread

    New posts Forum is locked
    © 1995  ·  iWeb, Inc  ·  DBA JimWorld Productions