I have login page for two pages. I am trying to get it to go to one page if it is at a certain page (view.cfm) and for all other pages it comes from it should go to the main page (index.cfm).
I tried conditions based on referer page but it wont work and always seems to go to the index.cfm page.
Please advise.
Tried it without the session.AA and session.BB (using just variables "AA" and "BB") and it still wont work.
I also tried cgi.path_info for trying to get last page but it wont work on my browsers.
I tried conditions based on referer page but it wont work and always seems to go to the index.cfm page.
Please advise.
Code:
<CFSET Session.Auth ='True'>
<CFSET Session.Admin = Form.Username>
<cfset session.AA = ListFirst(ListLast(cgi.http_referer,"/\"),"")>
<cfset session.BB = ListFirst(ListLast(cgi.http_referer,"?"))>
<cfif session.AA eq "view.cfm">
<CFLOCATION url='editPage.cfm?BB'>
<cfelse>
<CFLOCATION url='index.cfm'>
</cfif>
I also tried cgi.path_info for trying to get last page but it wont work on my browsers.