Hi,
I want to redirect to a page in another directory, How can I do it in PHP?
Exaple, I want to jump from htdocs/site/test1/index.php to htdocs/site/test2/index.php.
Thanks
| SitePoint Sponsor |
Hi,
I want to redirect to a page in another directory, How can I do it in PHP?
Exaple, I want to jump from htdocs/site/test1/index.php to htdocs/site/test2/index.php.
Thanks
you're trying to make the browser reload into the new directory (via header)? or including the content of the new directory in the current page (via include)? Or are you trying to do it with .htaccess in apache (which would be a different forum)?
Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.
Referring to you question I think I should use header syntax. I want browser to reload into the new directory.
Below worked for me
header('Location:/site/test2/');
Bookmarks