Redirect help needed..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Realpascal
    Confirmed User
    • Jun 2005
    • 2119

    #1

    Redirect help needed..

    I want to make the following redirection:

    www.mydomain/folder
    redirected to:
    www.mydomain/folder/folder2

    But when I use a .htaccess
    Redirect /folder http://www.mydomain.com/folder/folder1
    The server goes into an endless loop.

    I must be going nuts.. What am I doing wrong ?
    OMGWTFBBQ
  • Realpascal
    Confirmed User
    • Jun 2005
    • 2119

    #2
    Can anyone help me out here ?
    OMGWTFBBQ

    Comment

    • taibo
      Confirmed User
      • May 2005
      • 3720

      #3
      use meta redirect?

      Comment

      • fris
        Too lazy to set a custom title
        • Aug 2002
        • 55679

        #4
        can use php to do that.

        http://www.php.net/header

        look at the info there
        Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

        Comment

        • darksoul
          Confirmed User
          • Apr 2002
          • 4997

          #5
          heh, obviously.
          Redirect /folder will redirect all requests, including /folder/folder2
          You could redirect using mod_rewrite

          Code:
          RewriteEngine On
          RewriteCond %{REQUEST_URI}      !^/folder/folder2.*$ [NC]
          RewriteCond %{REQUEST_URI}       ^/folder/.*$ [NC]
          RewriteRule ^(.*)       http://www.domain.com/folder/folder2/$1 [R,L]
          1337 5y54|)m1n: 157717888
          BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
          Cambooth

          Comment

          • Realpascal
            Confirmed User
            • Jun 2005
            • 2119

            #6
            Originally posted by taibo
            use meta redirect?
            Possible, but I would prefer to use .htaccess. Thanks for the suggestion anyway..
            OMGWTFBBQ

            Comment

            • Realpascal
              Confirmed User
              • Jun 2005
              • 2119

              #7
              Originally posted by fris
              can use php to do that.

              http://www.php.net/header

              look at the info there
              Thanks Fris, I didn't know that option
              OMGWTFBBQ

              Comment

              • grumpy
                Too lazy to set a custom title
                • Jan 2002
                • 9870

                #8
                in the page < s c r i p t > window.location='the url'< / s c r i p t >

                without the spaces
                Don't let greediness blur your vision | You gotta let some shit slide
                icq - 441-456-888

                Comment

                • Realpascal
                  Confirmed User
                  • Jun 2005
                  • 2119

                  #9
                  Thanks for all help, guys !

                  Gave Darksoul's option a try, and it worked great.
                  OMGWTFBBQ

                  Comment

                  • "Rocky"
                    I want an Adult.com Jacket
                    • Jul 2005
                    • 318

                    #10
                    http://www.mydomain/folder/index.php >>

                    <?
                    header("Location: http://www.mydomain/folder/folder2");
                    ?>

                    Comment

                    Working...