need help with .htaccess

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nubianprince
    Confirmed User
    • Nov 2002
    • 677

    #1

    need help with .htaccess

    dont know if this is possible ..

    is there anyway to rotate 2 different index pages of a site using .htaccess ?
    XVIDEOS WEBCAMS -/- MADE WITH A CUSTOM WP PLUGIN
  • Fake Nick
    So Fucking Banned
    • Jul 2004
    • 7708

    #2
    you can just use this php code as your index

    Code:
    <?php $amount = "2"; $url[1] = "http://www.yoursite.com/index1.html";$url[2] = "http://www.yoursite.com/index2.html";srand((double)microtime()*1000000); $random = rand(1,count($url));header("Location: $url[$random]");?>

    Comment

    • Nubianprince
      Confirmed User
      • Nov 2002
      • 677

      #3
      thanks.. tried it.. but it isnt rotating the url's its more redirecting to one of them ...
      XVIDEOS WEBCAMS -/- MADE WITH A CUSTOM WP PLUGIN

      Comment

      • Fake Nick
        So Fucking Banned
        • Jul 2004
        • 7708

        #4
        Originally posted by Nubianprince
        thanks.. tried it.. but it isnt rotating the url's its more redirecting to one of them ...

        I don't know what you mean by rotating ?? I assumed you want to shift between two pages ? ? so that you don't always get the same indeX ? with this code you can create as many index pages as you want
        Last edited by Fake Nick; 09-17-2004, 06:33 PM.

        Comment

        • Tom_PMs
          Confirmed User
          • Jun 2004
          • 2049

          #5
          I think he means it randomly picks one which is what the code says to do, instead of showing 1, then 2, then 1, then 2..

          Why does it matter? Random should be good enough.. else use a cookie or something and if cookie=1, display 2 and so forth.

          You've read it, you can't unread it.

          Comment

          • Nubianprince
            Confirmed User
            • Nov 2002
            • 677

            #6
            ok i got it to work.. thanks man ..
            XVIDEOS WEBCAMS -/- MADE WITH A CUSTOM WP PLUGIN

            Comment

            • xxxoutsourcing
              Confirmed User
              • Oct 2003
              • 3888

              #7
              You can always find some free scripts at
              hotscripts.com
              There are lots of free resource sites like that, which have cool free scripts to have a play with.

              xxxoutsourcing.com
              ICQ:119936 | Aim:xxxoutsourcing | MSN:msn@ xxxoutsourcing.com | Yahoo:xxxoutsourcing
              Submitters, Designers, Programmers, Cartoonist, Creative Writers, Video & Photo Editors
              Convert your Paysite into a cartoon site convert2toons.com

              Comment

              Working...