Refererr - help!

I am new to PHP coding and am in a jam. I inherited some code and it is set up incorrectly. Currently it is set to refer from one place to my site, but I just found out that there is a glitch.

The way it is set up:
1.) someone will type in a url (www.fnln.invent.com)
2.) they are referred to my site. (www.anothersite.com/starthere)

The way it should be set up is as follows:

1.) someone will type in a url (www.fnln.invent.com)
2.) that will redirect them to another site (www.mysite.org)
3.) then, they should be redirected to my site. (www.anothersite.com/starthere)

Any insight as to how to help this thing work would be greatly appreciated. Again, I am at a loss as to how to start to fix this so any help would be HUGE!!

Thanks!

Are you asking how to redirect from one site to another? You can do this in several ways.

  1. Using .htaccess
Redirect 301 /index.html http://www.site2.com

If mod rewrite is enabled, you can redirect like this:

RewriteEngine on
RewriteRule ^forums/?$ http://www.site2.com [R=301]
  1. Within PHP script, before any output to browser:

[php]

<?php header("Location: http://www.site2.com"); exit; ?>

[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service