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 (
2.) they are referred to my site. (

The way it should be set up is as follows:

1.) someone will type in a url (
2.) that will redirect them to another site (
3.) then, they should be redirected to my site. (

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!!


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

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

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


<?php header("Location:"); exit; ?>


Sponsor our Newsletter | Privacy Policy | Terms of Service