# Using header function in php

**URL:** <https://forum.kirupa.com/t/using-header-function-in-php/270483>\
**Category:** Uncategorized\
**Created:** [September 10, 2008, 1:07pm UTC](https://forum.kirupa.com/t/using-header-function-in-php/270483 "2008-09-10T13:07:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rororo](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rororo](https://forum.kirupa.com/u/rororo)\
**Post date:** [September 10, 2008, 1:07pm UTC](https://forum.kirupa.com/t/using-header-function-in-php/270483/1 "2008-09-10T13:07:20Z")

</div>

hey, another question!  
i’m including a redirect script (in php) for all of my pages - i have three different domain names… two of them are aliases to the third.  
so i placed the script in the header and it works on all of the pages except for… guess who? you got it - the index page! i get the error that the page has already sent out header information, but of course, it hasn’t - it’s on the first line of the page… and it works on all other pages with the same exact include file…  
any ideas? can this be because of the alias or something?
