How do I make a redirect?
Moderator: General Moderators
How do I make a redirect?
I need a redirect from http://www.norskstabbursmat.no to http://www.norskstabbursmat.no/kurv/
can anyone tell me how to do this?
can anyone tell me how to do this?
Code: Select all
header("Location: www.norskstabbursmat.no/kurv/");ok I went to my index.php file and in the header I put this code:
And I got this error msg:
Code: Select all
<?php header("Location: http://www.norskstabbursmat.no/kurv/");?>Warning: Cannot modify header information - headers already sent by (output started at /hsphere/local/home/nstab/norskstabbursmat.no/index.php:10) in /hsphere/local/home/nstab/norskstabbursmat.no/index.php on line 25
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
the redirection must happen before any output is sent to the requesting agent.
Read here: viewtopic.php?t=1157
Read here: viewtopic.php?t=1157