monosyth
asked on
Cfhttp is getting Re-redirected
I am trying to use CFhttp and redirect to a page, but it puts me back to the login area of my wordpress blog.
I get different responses when I try to go two different urls.
URL 1: the admin area of wordpress
URL 2: the login area of wordpress
When I try to use CFhttp to go the admin area... it just shows (redirects to) the login. I want it to cfhttp to the admin area! I am already logged in, so that is not the issue. I also don't think that this is a wordpress issue per se, but it's what I'm working with.
Below are the two different header responses from the two pages:
I get different responses when I try to go two different urls.
URL 1: the admin area of wordpress
URL 2: the login area of wordpress
When I try to use CFhttp to go the admin area... it just shows (redirects to) the login. I want it to cfhttp to the admin area! I am already logged in, so that is not the issue. I also don't think that this is a wordpress issue per se, but it's what I'm working with.
Below are the two different header responses from the two pages:
URL 1: (This does not go where I want it to - it re-redirects to the login page)
HTTP/1.1 200 OK Connection: close Expires: Wed, 11 Jan 1984 05:00:00 GMT Date: Tue, 21 Apr 2009 01:11:49 GMT Server: Apache/2.2.3 (CentOS) Content-Length: 2166 X-Powered-By: PHP/5.1.6 Pragma: no-cache Cache-Control: no-cache, must-revalidate, max-age=0 Set-Cookie: wordpress_test_cookie=WP+Cookie+check; path=/; domain=.mywebsite.com Last-Modified: Tue, 21 Apr 2009 01:11:50 GMT Content-Type: text/html; charset=UTF-8
URL 2: (The login area)
HTTP/1.1 200 OK Content-Type: text/html; charset=UTF-8 Connection: close Date: Tue, 21 Apr 2009 01:12:37 GMT X-Pingback: http://blogname.mywebsite.com/xmlrpc.php Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.1.6
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
that first link i posted explains in great detail how to extract returned cookie info and use it in subsequent cfhttp requests.
Azadi
Azadi
ASKER
It's a bit in depth for me at my expertise level, so it will probably take me a while to figure it out.
Ben's explanation just looks overwhelming - once you start working through the code it is actually pretty straight-forward.
his code samples are always top-notch, and you will probably pick up a few good code habits from there (i know i did!).
just shout if you get stuck or need any help!
Azadi
his code samples are always top-notch, and you will probably pick up a few good code habits from there (i know i did!).
just shout if you get stuck or need any help!
Azadi
ASKER
I need to figure out how to get the cookie information and pass it through. When i try it now, it returns this info:
Cookie Name= wordpress_test_cookie
Cookie Value= WP+Cookie+check
These are not real cookie names and values...