Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have the following snippet but does not seem to work when I try to redirect to referer page:
<?php echo url($_SERVER["HTTP_REFERER"], array('absolute' => true, 'external' => true)); ?>
Comment | File | Size | Author |
---|---|---|---|
#2 | referalredirect 2017-02-21 15-11-38.png | 151.74 KB | saradaprasad17 |
Comments
Comment #2
saradaprasad17 CreditAttribution: saradaprasad17 at Valuebound commentedHi,
Found the solution for the issue . put this code in the php code area. it will redirect to the specified url.
Note : We need to enable the PHP Filter Module . Find the screenshot .
Comment #3
dtolj CreditAttribution: dtolj commentedIt doesn't seem to work with $_SERVER["HTTP_REFERER"] but hard-coded urls work. any idea why?
Comment #4
sano CreditAttribution: sano commentedThe solution recommended by @dtolj works. Make sure you do not have any Rules defined that would interfere with your Login Destination rule.