Re: cgi.http_referrer question
On 8/11/2011 11:39 AM, Russ Michaels wrote: > > there should be some additional headers that are added by Apache with the > original requested url, they may not be in the CGI scope though, or perhaps > you need to specifically enable them in the Apache config. Figured out a way to do it. Maybe not ideal, but it works. http_referrer is returning the url variable as the htaccess defines it as a query string: cgi.QUERY_STRING = action=whatever... So, if I strip out all the unneeded stuff (don't know where the "..." at the end is coming from, but it's in the dump): ...and that give me JUST the url var I started with, so I can rebuild from here: url = "http://www.mysite.com/#thisURL# ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346708 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cgi.http_referrer question
there should be some additional headers that are added by Apache with the original requested url, they may not be in the CGI scope though, or perhaps you need to specifically enable them in the Apache config. On Thu, Aug 11, 2011 at 3:50 PM, Les Mizzell wrote: > > I've got a site using an .htaccess file for friendly URLs. > The index page of the site controls everything, so the .htaccess file > simply converts the the url into variables and redirects back to the index. > > User sees: > www.mysite.com/newsletters/march > > Get's directed to: > www.mysite.com?area=newsletters&month=march > > ...or whatever > > I've got a case where I need to know the link within the site that a > user came from on in order to direct them elsewhere properly. > > Problem is that cgi.http_referrer doesn't play nice with the .htaccess > file. > > If I come from my example above: > www.mysite.com/newsletters/march > > cfdump var="#CGI#" gives me: > > HTTP_HOST www.encompassediscoverymysite.com > HTTP_REFERER[empty string] > PATH_INFO /index.cfm > > Any ideas of another way I can capture the address as > "www.mysite.com/newsletters/march"? > > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346698 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
cgi.http_referrer question
I've got a site using an .htaccess file for friendly URLs. The index page of the site controls everything, so the .htaccess file simply converts the the url into variables and redirects back to the index. User sees: www.mysite.com/newsletters/march Get's directed to: www.mysite.com?area=newsletters&month=march ...or whatever I've got a case where I need to know the link within the site that a user came from on in order to direct them elsewhere properly. Problem is that cgi.http_referrer doesn't play nice with the .htaccess file. If I come from my example above: www.mysite.com/newsletters/march cfdump var="#CGI#" gives me: HTTP_HOST www.encompassediscoverymysite.com HTTP_REFERER[empty string] PATH_INFO /index.cfm Any ideas of another way I can capture the address as "www.mysite.com/newsletters/march"? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346691 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm