-1

Redirect visitor to different domain based on the domain and page they came from.

Can't find any info on this, or I’m wording it incorrectly. Redirecting visitor to different domain and page if they didn’t come from web-page on different Domain.

I’m trying to Redirect users to one of 2 places when user lands on Specific-Page on site. I would like when the page loads, If user did not come from “Site-one.com/page-name” it redirects user to “Site-two.com/page-name-default”

Please help! I just think I’m not wording it correctly.

Thx!

Looking for instruction, as to what direction to go.

jub0bs
  • 60,866
  • 25
  • 183
  • 186
  • You could save the current url in the session so you have access to it on the next page. (Will not work if session runs out) – Dokik Jan 26 '23 at 21:01

1 Answers1

0

You could check the $_SERVER['HTTP_REFERER'] variable and redirect based on that location.

Lin1
  • 11
  • 3