Hello, I’m not a PHP expert or EE expert. I’ve tried solving this problem, but I can’t and need help.
I have a site I’m building in EE (latest version).
There is a page at…
http://dev.pulaskiticketsandtours.com/agent
...where I am simply trying to test a redirect for a failed login.
It is not working.
The template is set to allow PHP and the parsing stage is set to Input.
The first line of code is this:
<?php
session_start();
if ( !isset($_SESSION['test']) ){
header("location:http://dev.pulaskiticketsandtours.com");
}
?>Instead of redirecting, it loads the page with this as the header:
Object Moved This document may be found here
The exact same code works on a test page I created at…
http://dev.pulaskiticketsandtours.com/test.php
...so the issue seems confined to the Expression Engine template/environment.
So far, I can get PHP to do anything I need to outside of EE, but this is my first try of putting PHP inside EE system. I’ve tried include files…everything..and scoured the net…can’t find a solution…and it seems like it should be pretty easy.
I am using IIS7.5 with URL rewrite, but so far everything has worked fine, and like I said…I can get this to work on the test page outside of EE. I’m totally at a loss.
Please help someone! Thanks!