header() redirect

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
evilchris2003
Forum Contributor
Posts: 106
Joined: Sun Nov 12, 2006 6:43 am
Location: Derby, UK

header() redirect

Post by evilchris2003 »

I am trying to redirect to a folder above the web root and cannot get it to work. I can get the file path from my cpanel but it doesnt seem to work. I assume this is because the www record for the domain points to public_html by default. Every thing I try I just get a 404 error and now im stumped

Any help is much appreciated
Chris
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: header() redirect

Post by Christopher »

You cannot reference above root. It's called root because it is the top. You should just include the file.
(#10850)
User avatar
evilchris2003
Forum Contributor
Posts: 106
Joined: Sun Nov 12, 2006 6:43 am
Location: Derby, UK

Re: header() redirect

Post by evilchris2003 »

Thanks for the info

Regards
Chris
Post Reply