1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How do you redirect web folder to homepage?

Discussion in 'Site & Server Administration' started by underdog, Jun 30, 2007.

  1. #1
    I'm trying to redirect all pages in a certain web directory of my website to my homepage. Can any .htaccess guru help me with this one?

    I need to get all files in the directory "foo" to go to my homepage
    www.site.com/foo/one.html -> www.site.com
    www.site.com/foo/two.html -> www.site.com
     
    underdog, Jun 30, 2007 IP
  2. bouncer69

    bouncer69 Peon

    Messages:
    978
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It will solve your problem

    
    RewriteEngine on
    Options +FollowSymLinks
    
    <IfModule mod_rewrite.c>
    
    RewriteCond %{HTTP_HOST} . 
    RewriteCond %{HTTP_HOST} ^.*$
    RewriteRule ^foo/? http://www.site.com/ [R=301,L]
    PHP:
     
    bouncer69, Jul 1, 2007 IP
  3. Camay123

    Camay123 Well-Known Member

    Messages:
    3,423
    Likes Received:
    86
    Best Answers:
    0
    Trophy Points:
    160
    #3
    You can use cpanel to redirect all /foo traffic to /
     
    Camay123, Jul 5, 2007 IP
  4. sms4promotion

    sms4promotion Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    One can easily redirect a web page OR Web Folder to another webpage using CPanel
    1. Just go to CPanel search for "Redirects"
    2. Click on that and select type of redirect, web page to be redirected and reidrects to.
    3. Click Add button.
    And you done
     
    sms4promotion, Sep 5, 2012 IP
  5. cesurasean

    cesurasean Active Member

    Messages:
    269
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    80
    #5
    If you need help with this, we can speak via skype - cesurasean is my screen name.
     
    cesurasean, Sep 26, 2012 IP