Posted by nocte on May 28, 2009 at 3:04am
Jump to:
| Project: | Front Page |
| Version: | 6.x-1.2 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Hello,
This module seems to check the referrer in order to decide wether it should redirect or not.
When i visit the site's root directory from an url that contains the site url (e.g. http://www.anonym.to/?http://www.example.com/ ) i'm redirected to the front page (e.g. http://www.anonym.to/?http://www.example.com/frontpage ).
Kind regards,
nocte
Comments
#1
you need to create a simple php script to put into your front page settings that checks the referrer (where the visitor has come from) and then use the drupal_goto function to redirect them.
Something like this:
<?php$redirecthome = "/node/2"; //change to suit
$regularhome = "/node/3"; //change to suit
$referrer = $_SERVER['HTTP_REFERER'];
if (preg_match("/mydomain.com/",$referrer)) { // change mydomain.com to suit.
drupal_goto($path = $redirecthome, $query = null, $fragment = null);
} else {
drupal_goto($path = $regularhome, $query = null, $fragment = null);
};
?>
hope that helps