Need help with a PHP 301 redirect

                Searched everywhere and still don't know how to do it  :'( 

How could I redirect a php variable and how can I insert this into an existing/working index.php file. I only want to redirect the variables.

I can create a normal old file to new file redirect with:

<?php header("HTTP/1.1 301 Moved Permanently"); header("Location:"); exit(); ?>

But unfortunately I need to redirect variables on a file that works for other purposes…

Essentially I want:
index.php?option=com_content&task=view&id=70&Itemid=40 to point to folder 1
[/color]index.php?option=com_content&task=view&id=70&Itemid=42 to point to folder 2

I think I should be looking at something like this:

<?php if(isset($_GET['option']) && $_GET['option'] == "something")) { header("HTTP/1.1 301 Moved Permanently"); header("Location:"); // at this point you should not really use exit . } ?>

But what do I put into that “something” and would I have to paste that into the fully working index.php?
Many thanks for the help!

Sponsor our Newsletter | Privacy Policy | Terms of Service