Advanced Search

Results 1 to 4 of 4

Thread: Redirection

  1. #1
    Join Date
    Jan 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Redirection

    Well.
    Im running part of a gaming fansite, and on this game there are values for pieces of furniture etc.

    Well on the site theres 2 links to the values on it
    one is /rarevalues and the other is an actual domain on the same server

    i need the /rarevalues directory to re-direct to the actual domain but as theyre running through the same directory i can figure a way of doing it. theres probably some simple way.

    i thought
    PHP Code:
    <?
    if(isset($_GET['rarevalues']));
    redirect code here;
    ?>
    might do it but then i thought it only checks if theres ?rarevalues and not /rarevalues.
    and i couldnt find a good re-direct code.

    Help please.

  2. #2
    Join Date
    Jun 2007
    Posts
    543
    Thanks
    3
    Thanked 78 Times in 78 Posts
    Blog Entries
    1

    Default

    Maybe try htaccess redirection: Google
    [Jasme Library (Javascript Motion Effects)] My Site
    /\/\@ /\/\@|{
    There are 10 kinds of people in the world, those that understand binary and those that don't.

  3. #3
    Join Date
    Jul 2008
    Posts
    199
    Thanks
    6
    Thanked 58 Times in 57 Posts

    Default

    So you're looking for a .htaccess redirect?
    Code:
    RewriteEngine on
    RewriteRule ^rarevalues http://example.com/ [R,L]

  4. #4
    Join Date
    Mar 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I think what you are looking for is:

    PHP Code:
    $pagetogoto "index.php";
    header ("Location: ".$pagetogoto); 
    This will redirect the page immediately when the PHP script reaches it.

    Just make sure that the script has not output anything to the page yet as nothing can be sent to te browser before this is done.

    Cheers

    The Moose

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •