Submit Your Article Forum Rules

Results 1 to 8 of 8

Thread: Question regarding Links and .htaccess

  1. #1
    WebProWorld MVP dharrison's Avatar
    Join Date
    May 2005
    Location
    Essex UK
    Posts
    1,334

    Question regarding Links and .htaccess

    Hi All

    I need a bit of guidance from someone in the know. In Google, I have 3 links pointing to my root (/) and 5 links pointing to my actual home page, which obviously is the same page. I know I can set up .htaccess to so these 2 results can be integrated, my question is what command do I need?

    Also I have a redirect from my original site (about 6 years ago).

    Code:
    redirect 301 /index.shtml http://www.xxxxxxxxxx.com/home
    My other question is will this line affect the line I would like to add for the / and home page?

    Thanks in advance.
    Deb Harrison
    Essex Web Design | DVH Design Blog
    If I have helped please add to my Reputation

  2. #2
    WebProWorld MVP dharrison's Avatar
    Join Date
    May 2005
    Location
    Essex UK
    Posts
    1,334
    Okayyyy, I haven't been on this forum a while, but mods if this needs to go into Dumb Questions category, then please do feel free to move it there.
    Deb Harrison
    Essex Web Design | DVH Design Blog
    If I have helped please add to my Reputation

  3. #3
    Moderator Tiggerito's Avatar
    Join Date
    May 2004
    Location
    Adelaide, Australia
    Posts
    552
    I'd personally make the root your home page and redirect the variations to that. Otherwise you will always have a mix of links and redirects for users and search engines to deal with.

    Your syntax looks fine.

  4. #4
    WebProWorld MVP dharrison's Avatar
    Join Date
    May 2005
    Location
    Essex UK
    Posts
    1,334
    Thanks McCreath, but how can I do that? I am up on theory and not so on development.

    Thanks in advance.
    Deb Harrison
    Essex Web Design | DVH Design Blog
    If I have helped please add to my Reputation

  5. #5
    Administrator weegillis's Avatar
    Join Date
    Oct 2003
    Posts
    5,826
    Deb, is /home a directory? This is how it might be interpreted.

    If you research mod_rewrite I believe you'll find a solution that both canonicalizes the WWW subdomain and removes index.html, etc, from the request URL. Essentially rewriting all request URL's into a single, consistent form: http://www.example.com/. I'd post something, but invariably would be jumping in over my head. I know this is no help, but with some digging, you'll find just what we're talking about here.

  6. #6
    Moderator Tiggerito's Avatar
    Join Date
    May 2004
    Location
    Adelaide, Australia
    Posts
    552
    I'm on the road at the moment so can't do much.

    Google ".htaccess 301 redirect generator bulk" and you should find a tool I wrote to create the code for you. Hopefully that will help you write the right things. Feed in something like:

    /index.shtml, /
    /home, /

  7. #7
    WebProWorld MVP dharrison's Avatar
    Join Date
    May 2005
    Location
    Essex UK
    Posts
    1,334
    Hi Tony

    It seems to work. Many thanks for that.

    Was that created especially for me? lol.
    Deb Harrison
    Essex Web Design | DVH Design Blog
    If I have helped please add to my Reputation

  8. #8
    Moderator Tiggerito's Avatar
    Join Date
    May 2004
    Location
    Adelaide, Australia
    Posts
    552
    Quote Originally Posted by dharrison View Post

    Was that created especially for me? lol.
    Of course
    by Tony McCreath (Tiggerito)
    owner of Web Site Advantage

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •