troubleshooting Question

Trying to Link to a Blog Article from an E-mail

Avatar of kenjpete
kenjpete asked on
ColdFusion Language
10 Comments1 Solution259 ViewsLast Modified:
I have a blog that is password-protected. Each month I send out an e-mail newsletter that contains excerpts from articles in the blog. Each excerpt has a link to the blog so the user can read the whole story.

I am trying to link to the individual article in the blog from the e-mail. If the user is not logged in to the blog, I want them to go to the login page and then get directed to their requested blog article, not the blog home page.

Here is the code I use to determine if the user is logged in or not:

<!--- Check login status --->
<cfparam name="Session.Auth.isLoggedIn" default="No">

<cfif Session.Auth.isLoggedIn EQ "No">
<cfif  ListLast(CGI.SCRIPT_NAME, "/") EQ "index.cfm">
          <script>
               self.location="/login.cfm";
           </script>
     </cfif>
</cfif>

How do I direct the visitor to the blog article after they login instead of just going to the blog home page? Do I have to add a URL parameter?

Here is a sample link:
http://www.myblog.com/blog/index.cfm/2012/3/13/this-is-the-blog-article
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros