Get exclusive CAP network offers from top brands

View CAP Offers

How to set a re-direct for all sub-pages?

[bsa_pro_ad_space id=2]
  • This topic is empty.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #615569

    Hi there,

    I have just started re-designing my website and since I don’t know php (yet) and don’t use the CMS system, most of my work is done manually. That is fine and enough for the purpose of my sites for now (news will be added via built-in blog) but I have a problem with changing the names of my sub-pages.

    I hear that I should use a re-direct 301 but tbh I have never done it so can someone advise if that’s what I need here?

    Basically, I’m changing sites from, eg. http://www.mysite.com/i-like-you.html to http://www.mysite.com/ilikeyou.html
    So should I keep the other site on server and just re-write it with re-direct script? Or should I create that htaccess file and it will re-direct all invalid subpages to the main page for me? (I would like that!)

    Hope you can help! Thanks :hattip::hattip:

    #796393
    Cooky
    Member

    Hi Livegirl,

    You will want to use a htaccess to accomplish this rather than a redirect because you are (seemingly) redirecting the entire site starting with what I am guessing is your primary subdirectory.

    You could use 301’s, but you would want need to do it on each page.

    Also be sure to use the canonicalisation feature to assign one primary domain to preserve link juice. You can read more about that here; Canonicalisation

    Why is it that you are doing this anyways? The removal of the dashes will not provide any added SEO element to the URL structure?

    Gary

    #796402

    Hi Gary,

    Thanks for replying!

    It’s not the whole site, it’s some sub-directories. The dashes were just an example – I want to change the title of sub-pages from for example main.html to livedealers.html etc.

    Will htaccess also handle the wrong spelling of my sites? Or any old sub-pages that I might have changed in the past?

    Thanks,
    livegirl :)

    #796468
    Cooky
    Member
    livegirl1;199109 wrote:
    Hi Gary,

    Thanks for replying!

    It’s not the whole site, it’s some sub-directories. The dashes were just an example – I want to change the title of sub-pages from for example main.html to livedealers.html etc.

    Will htaccess also handle the wrong spelling of my sites? Or any old sub-pages that I might have changed in the past?

    Thanks,
    livegirl :)

    Hi Livegirl1,

    The .htaccess file is a text file which resides in your main site directory and/or in any subdirectory of your main directory. There can be just one, there can be a separate one in each directory or you may find or create one just in a specific directory.

    Any commands in a .htaccess file will affect both the directory it is in and any subdirectories of that directory. Thus if you have just one, in your main directory, it will affect your whole site. If you place one in a subdirectory it will affect all the contents of that directory.

    You could use a redirect meta tag in the head of the old pages to bring users to the new ones, but some search engines may not follow the redirect and others frown upon it.

    Here’s how to do it;

    Enter this line in your .htaccess file:
    Redirect permanent /oldfile.html http://www.domain.com/filename.html

    You can repeat that line for each file you need to redirect. Remember to include the directory name if the file is in a directory other than the root directory:
    Redirect permanent /olddirectory/oldfile.html http://www.domain.com/newdirectory/newfile.html

    (this is wrapping here but needs to be on a single line)

    If you have just renamed a directory you can use just the directory name:
    Redirect permanent /olddirectory http://www.domain.com/newdirectory

    If you have backlinks to your site this will also fix this issue, and any future issues.

    Yes and yes to your last 2 questions,

    #796475

    thank you ever so much Gary x

    #796497
    Cooky
    Member

    Geez livegirl1, I just noticed your in Hawaii.

    Want some free SEO??

    Put me there for 2 weeks and I;ll have you top 3 before you give me the return flight tickets!

    Gary

    #796514
    GeoffreyMe
    Member

    garytsg

    just read your blog after discovering it through this thread.

    had to post that i was fascinated. first time i’ve read about seo thats not written in such an esoteric way it all becomes to hard.

    cheers

    #796521
    Cooky
    Member
    faststeady;199288 wrote:
    garytsg

    just read your blog after discovering it through this thread.

    had to post that i was fascinated. first time i’ve read about seo thats not written in such an esoteric way it all becomes to hard.

    cheers

    Thanks faststeady,

    I try to keep things in laymans terms as much as possible but sometimes that’s the real challenge. Were you referring to ppc-managers.blogspot.com or garythescubaguy.com?

    Thanks again. That makes it worth continuing to do. Cheers!

    #796559
    GeoffreyMe
    Member

    your names sakes blog, ill read the other one tonight.

    will be definately giving you a hollow in the near future if you dont mind when kundans finished my latest project design to ensure i plan it out properly at the start :)

    cheers

    #796589
    GaryTheScubaGuy;199258 wrote:
    Geez livegirl1, I just noticed your in Hawaii.

    Want some free SEO??

    Put me there for 2 weeks and I;ll have you top 3 before you give me the return flight tickets!

    Gary

    hahaha ok!

    where do i have to fly you from? :)

    #796593
    Cooky
    Member

    London :)

    I’ll be in Cancun and Holland for the next 6 weeks though for CAP Spring Break and CAP/A4U & the CAC conferences. June my son and sister are flying in so May is really the only thing open and I’m in Sweden the last week so anytime between the 1-3rd week of May. :highflyer

    #797079

    hey maybe it’s going to sound dumb but i created the .htaccess file in my notepad and put the lines as suggested by you , eg
    Redirect permament /50pounds.html http://www.live-roulette866.com

    and submitted it into the desired directory but nothing happens. did i miss something? did i save the file wrong?

Viewing 12 posts - 1 through 12 (of 12 total)