Jump to content

No Need For Redirect.php


Vile

Recommended Posts

You can just use require('file.htm'); inside of an index.php

here's my setup:

index.php:

<?php
$hhost = $_SERVER['HTTP_HOST'];

if (strstr($hhost, "facebook.com")) require('facebook.htm');
elseif (strstr($hhost, "twitter.com")) require('twitter.htm');

?>

Then it's just a matter of modifying the htm files to load the css/image files from ./twitterfiles/ subfolders or what have you.

It makes it more clean to have the files in subfolders and to not have to rely on senseless redirecting. The referrer page will still be held in the HTTP_HOST environment variable.

(Of course this is just a hypothetical, no one would really want to use a jasager with facebook.com or twitter.com, that's just silly)

Edited by Vile
Link to comment
Share on other sites

why is that silly?

You can just use require('file.htm'); inside of an index.php

here's my setup:

index.php:

<?php
$hhost = $_SERVER['HTTP_HOST'];

if (strstr($hhost, "facebook.com")) require('facebook.htm');
elseif (strstr($hhost, "twitter.com")) require('twitter.htm');

?>

Then it's just a matter of modifying the htm files to load the css/image files from ./twitterfiles/ subfolders or what have you.

It makes it more clean to have the files in subfolders and to not have to rely on senseless redirecting. The referrer page will still be held in the HTTP_HOST environment variable.

(Of course this is just a hypothetical, no one would really want to use a jasager with facebook.com or twitter.com, that's just silly)

Link to comment
Share on other sites

@Vile: Thanks for the tip, will try it this weekend...

...as well as playing with spt to see if it can work with a fon 2202

cheers phk

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...