|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Confirmed User
Industry Role:
Join Date: Nov 2002
Location: Canada
Posts: 677
|
need help with .htaccess
dont know if this is possible ..
is there anyway to rotate 2 different index pages of a site using .htaccess ? |
|
|
|
|
|
#2 |
|
So Fucking Banned
Join Date: Jul 2004
Location: go troll goo!
Posts: 7,708
|
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]");?>
|
|
|
|
|
|
#3 |
|
Confirmed User
Industry Role:
Join Date: Nov 2002
Location: Canada
Posts: 677
|
thanks.. tried it.. but it isnt rotating the url's its more redirecting to one of them ...
|
|
|
|
|
|
#4 | |
|
So Fucking Banned
Join Date: Jul 2004
Location: go troll goo!
Posts: 7,708
|
Quote:
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 |
|
|
|
|
|
|
#5 |
|
Confirmed User
Join Date: Jun 2004
Posts: 2,049
|
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. |
|
|
|
|
|
#6 |
|
Confirmed User
Industry Role:
Join Date: Nov 2002
Location: Canada
Posts: 677
|
ok i got it to work.. thanks man ..
|
|
|
|
|
|
#7 |
|
Confirmed User
Join Date: Oct 2003
Posts: 3,888
|
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 |
|
|
|