...

View Full Version : Redirect issue - whoever helps it get rapidshare acc



smgh
12-14-2008, 07:07 AM
I have problem, thx for in advance

I have website and my problem is that i want user to go to first my homepage, they can't go to other pages first, if they type the url they redirect to my homepage and then they can go to other pages ? any idea guys ? need help really ....

no sound in flash file - any suggestion ?

THanks in advance

If you anwser my solution i will give you rapidshare acc.

_Aerospace_Eng_
12-14-2008, 08:01 AM
Include a file on the other pages. In this file check for a session. If this session does not exist send them back to the index page. On the index page set the session. Then they would be able to go to other pages.

checksession.php

<?php
session_start();
if(!isset($_SESSION['home'])) header("Location: index.php");
?>

Then in your pages add

<?php include_once('checksession.php'); ?>
On your index page add this to the very top before any HTML.
[php]<?php
session_start();
$_SESSION['home'] = "true";
?>

As to the sound in the flash file we would need to see your page but its likely the sound path is wrong. Its relative to the location of the flash file not the web page.

194673
12-14-2008, 08:02 AM
Not the most secure, but you can try this...

In your index.php (homepage) file, set a session variable:


session_start();
$_SESSION['checkpoint'] = "true";


In your other pages do this


session_start();
if (!isset($_SESSION['checkpoint']) || $_SESSION['checkpoint'] != "true")
header('Location: index.php');


Edit: XD I guess aerospace was 1 minute ahead of me



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum