Results 1 to 4 of 4

 

Thread: .htaccess redirect question

  1. #1
    Driving to win

    Status
    Offline
    Join Date
    Aug 2003
    Location
    If I'm not at home, I'm in hospital
    Posts
    7,370
    Thanks
    7
    Thanked 16 Times in 11 Posts


    OK

    Havent asked a question about this for a while as I've mostly got my head around it but before I spend hours trying to get this to work if its not possible........

    I used to have a lot of pages in a subdirectory - they no longer exist - can I put a .htaccess file either in that directory or in the root directory which will point anyone trying to access one of those pages to a particular webpage - essentially I want to tell visitors that that range of products is no longer available but still let them view the rest of the site rather than them just get a 404 error
    Never argue with idiots. They just drag you down to their level and then beat you with their experience.

    If ignorance is bliss then some of the people I know must be orgasmic.

  2. #2
    Keith's Avatar
    Moderator

    Status
    Offline
    Join Date
    Aug 2003
    Location
    Richmond North Yorkshire
    Posts
    2,540
    Thanks
    172
    Thanked 119 Times in 83 Posts
    this thread should sort you out http://www.webmasterworld.com/forum3/14412.htm
    Keith ~ My Blog general ramblings. Internet Marketing Blogs UK all the blogs together in one place (pm for inclusion)

  3. #3
    Elaine's Avatar
    Registered User

    Status
    Offline
    Join Date
    Aug 2003
    Location
    Redcar Cleveland North of Leeds
    Posts
    2,564
    Thanks
    120
    Thanked 86 Times in 62 Posts
    if you want to redirect individual pages its

    permanent redirect /oldpage.htm http://www.newpage.htm



    i'm sure there must be variations to redirect file to file as well - but didnt get there far

    cheers
    Elaine - Children's Rooms, Allkids & Toddler Beds
    email: info @ childrens-rooms.co.uk
    01642 440110

    Parent Centre - Parenting Blog

  4. #4
    Frostie's Avatar
    Moderator

    Status
    Offline
    Join Date
    Aug 2003
    Location
    Wirral
    Posts
    3,217
    Thanks
    61
    Thanked 60 Times in 27 Posts
    As mentioned, use redirects - similar to when you change from html to php, or move files to a new directory.

    As an example, I have in mine;
    redirect 301 /about.html http://www.mysite.co.uk/about_us.php

    But you could also have for example;
    redirect 301 /category.php?cat=1 http://www.mysite.co.uk/no_longer_exists.php
    redirect 301 /category.php?cat=5 http://www.mysite.co.uk/no_longer_exists.php
    redirect 301 /category.php?cat=7 http://www.mysite.co.uk/no_longer_exists.php

    etc.

    Oh, and this .htaccess file sites in my root.



Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Content Relevant URLs by vBSEO 3.5.0 RC2