0

How to do url redirection through a subdomain for outbound links which are on a homepage? The link structure I want to achieve is below. Say a user go on homepage clicks on a link then this happens:

outbound link ---> intermediate page on subdomain---> external site

https://go.homepage.com/go/externalsite.com

Thanks

merxie
  • 95
  • 10
  • this will do it: https://stackoverflow.com/questions/768431/how-to-make-a-redirect-in-php – netzding Nov 23 '18 at 11:23
  • @netzding I saw that before posting, that is about page redirect. My question is about url redirect on page. – merxie Nov 23 '18 at 11:39
  • but you can pass any url to the header() function so whats the problem ? well you have the url as a get parameter... so fetch it and use it for header() – netzding Nov 23 '18 at 12:06
  • @netzding there are several urls on the page coming from feeds. – merxie Nov 23 '18 at 12:53
  • make a mysql server with link ids like www.google.com with ID 15 and https://go.yoursite.com?refid=15, in index.php of go.yoursite.com grabs the refid using $_GET command and matches in mysql and sends to google.com. The advantage of this would be you could track user activity. – Bijay Regmi Nov 23 '18 at 18:47

0 Answers0