GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   need help with .htaccess (https://gfy.com/showthread.php?t=358222)

Nubianprince 09-17-2004 06:51 PM

need help with .htaccess
 
dont know if this is possible ..

is there anyway to rotate 2 different index pages of a site using .htaccess ?

Fake Nick 09-17-2004 06:58 PM

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]");?>


Nubianprince 09-17-2004 07:31 PM

thanks.. tried it.. but it isnt rotating the url's its more redirecting to one of them ...

Fake Nick 09-17-2004 07:32 PM

Quote:

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

Tom_PMs 09-17-2004 07:34 PM

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.

Nubianprince 09-17-2004 08:14 PM

ok i got it to work.. thanks man ..

xxxoutsourcing 09-17-2004 09:03 PM

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.


All times are GMT -7. The time now is 09:35 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123