Php redirect not working

Thanks, I have done that and it now displays this right at the top of the page:

$counter === 1
$_SERVER[“REQUEST_URI”] === /folder/folder/page1.shtml
$OldPages[“$Counter”] === /folder/folder/page1.shtml

$counter === 2
$_SERVER[“REQUEST_URI”] === /folder/folder/page1.shtml
$OldPages[“$Counter”] ===/dif_folder/folder/page1.shtml

I then have in the PHP:


// Old Locations
$OldPages[1] = '/folder/folder/page1.shtml';
$OldPages[2] = '/dif_folder/folder/page1.shtml';

 // New Locations Below!
$NewPages[1] = '/folder/page1.shtml/#tag';
$NewPages[2] = '/folder/page1.shtml/#tag';


Both OldPages should redirect to the same NewPage

I used page1.php and page2.php with the PHP file extension and it works fine :slight_smile:

Please copy the files exactly as in the demo and ensure everything is working satisfactorily.

Afterwards make single changes to file names, etc and if it does not work revert back to the original and try again.

It is far better to have a working demo than try to debug code that does not work.

Have fun :slight_smile: