I have a script in website.com/login/, it contains all the files and forms need to proccess user authentication and contains the forms as well. I have the main login form on my main index, website.com/index.php. I have successfully directed the form to post /login/login-exec.php, but once the script has run it redirects to /login/login-success.php, not website.com/index.php?od=logsucc. How would i go about telling the login-exec.php to redirect to the main folder of the website instead of /login/?
Asked
Active
Viewed 134 times
1 Answers
0
use
header( 'Location: /index.php?od=logsucc' );
the leading / says go back to the site root directory.
Jay Blanchard
- 33,530
- 16
- 73
- 113
RiggsFolly
- 89,708
- 20
- 100
- 143
-
I'm gonna give that a try, i'll let ya know if it worked in a few moments. – DxVerm aka Xeno May 01 '13 at 23:27
-
-
but on the server level hostingsite.com/~user/index.php its telling me this: HTTP_Exception_404 [ 404 ]: Unable to find a route to match the URI: index.php – DxVerm aka Xeno May 02 '13 at 00:24
-
Ok try this header( 'Location: ../index.php?od=logsucc' ); That says go back one level and look for index.php – RiggsFolly May 02 '13 at 00:28
-
-
-
-
1