By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,521 Members | 1,447 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,521 IT Pros & Developers. It's quick & easy.

Page Redirecting Relative Path

P: 4
I'm trying to figure out how to do a page redirect to a relative path. This what I have:
[PHP]header ("location: Home.php");[/PHP]
but Home.php is one level up where the code is. I thought i could just type:
[PHP]header ("location: ..\Home.php");[/PHP]
but of course this didn't work. Any help?
Feb 17 '08 #1
Share this Question
Share on Google+
3 Replies


harshmaul
Expert 100+
P: 490
Hi,
I just tested this, and it worked fine...

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. header ("location: ..\index.php");
  3. ?>
Are you getting any errors, or what is happening?
Feb 17 '08 #2

P: 4
I just get a simply page not found

The requested URL /~black/_scripts/..\Home.php was not found on this server.

Never mind, Success! I played around with different slashes and it's working now. I swore i tried all the slashes earlier before and i was having the same problem but it seems to be working now. Thanks for your help anyways
Feb 17 '08 #3

Markus
Expert 5K+
P: 6,050
Since when do you use backslashes in urls?

:P
Feb 17 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.