Results 1 to 3 of 3

Thread: Redirect from Folder to Main Page

  1. #1
    Join Date
    Jan 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb Redirect from Folder to Main Page

    Hello. I hope someone can help. I want to redirect from a folder on site one to the main page on site2. So for example...allfiles in

    Site1.com/subdirectory/

    should point towards

    Site2.com/

    so Site1.com/subdirectory/file1.html would be the same as Site2.com/file1.html etc...

    I know that you put this in your .htaccess file when you are doing old-domain to new-domain redirection:

    RewriteEngine On
    RewriteBase /

    RewriteRule ^(.*)$ http://www.newsite.com/$1 [R=301,L]

    but how do you do a old-domain-folder to new-domain redirection?

    Thanks!!!

  2. #2
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by deezin
    I want to redirect from a folder on site one to the main page on site2. So for example...allfiles in

    Site1.com/subdirectory/

    should point towards

    Site2.com/

    so Site1.com/subdirectory/file1.html would be the same as Site2.com/file1.html etc...
    The Redirect directive (including RedirectPermanent and the like) will do fine here.

    Code:
    Redirect /subdirectory/ http://www.site2.com/
    Mike

  3. #3
    Join Date
    Jan 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Talking thank you

    Thank you Mike. :-)

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
  •