how do I redirect a folder

Discussion in 'Site & Server Administration' started by ZedPoint, Jul 6, 2007.

  1. #1
    I am in need of help.

    I have written several articles that I posted to article directories for seo purposes, but know realise that I have made an error in the link back URLs to my site. From looking at my stats, it turns out that I am missing out on some significant traffic due to this. The error I made in the URL was a mis-spelling of a folder name ( the same error in all of the articles I sent out).

    Can any one tell me of a way to just redirect the folder name while keeping the file name. I don't really want to have to add all the individual file names in my .htaccess file as there are quite a few.

    e.g. sitename.com/bad folder name/blahblaw.html to sitename.com/good folder name/blahblaw.html

    Thanks in a dvance
     
    ZedPoint, Jul 6, 2007 IP
  2. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #2
    just use:
    
    redirect /badfolder/ http://www.domain.com/goodfolder/
    
    Code (markup):
    and that acts as a wildcard
     
    frankcow, Jul 6, 2007 IP
  3. Camay123

    Camay123 Well-Known Member

    Messages:
    3,423
    Likes Received:
    86
    Best Answers:
    0
    Trophy Points:
    160
    #3
    You can do it via cpanel also, if you have cpanel.
     
    Camay123, Jul 6, 2007 IP
  4. ZedPoint

    ZedPoint Guest

    Messages:
    297
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks,
    Works like a charm.
     
    ZedPoint, Jul 6, 2007 IP