Do you have a question? Post it now! No Registration Necessary. Now with pictures!
March 26, 2008, 2:28 pm
rate this thread
I have a question regarding the header() function call in PHP.
I have a simple redirect directive as below in a file
This basically redirects the user to the english index.php page. The
functionality is working just fine, but the url looks strange.
I get after the redirect a url looking like http://www.xxxx.com/en/test.php
even though it is http://www.xxxx.com/en/index.php that is displayed
in the browser. Why is it like that? i want the url to look like
http://www.xxxx.com/en/index.php after its been redirected. Basically
it displayes the correct content with the wrong url.
First of all, you should use the full URI, i.e.
header("Location: http://www.example.com/en/index.php ");exit;
(use example.com - unless you own xxxx.com. That's what example.com,
.org, etc. are reserved for).
And it sounds like maybe you have a redirect on your system - maybe in
your .htaccess file?
Remove the "x" from my email address
JDS Computer Training Corp.