• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Redirecting and detecting URL keywords

Enthusiast ,
Apr 04, 2023 Apr 04, 2023

Copy link to clipboard

Copied

CF:2016 | IIS10

 

I know this is a little more of an IIS question, but wondering if anybody can advise

 

I need to put keywords into a URL without using actual variables and then redirect and collect the keyword

 

Example:

https://SomeWebSite/discount1

 

The folder discount1 does not exist and that is the keyword I need to detect on a CFM page.

 

I guess I could set up a redirect on 404 errors, to go to a CFM page, and then use CFM to pick up the refer information and then find the word in the URL.

 

After typing this I tried it out using a redirect in IIS for 404 errors, setting it to removed with a 302 redirect to an absolute URL, a CFM page. In the CFM page I displayed the HTTP_REFERER only to see that it was blank, so it's not passed on and therefore I can't extract the discount1 at the end of the URL

 

I'm wondering if anybody knows how to retain the original URL or how I should do it so that it actually works.

 

Thanks

 

 

Views

147

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Apr 15, 2023 Apr 15, 2023

I managed to resolve this myself. I did a dump of all CGI variables and found that the original URL was indeed present in a couple of places

 

All I needed to do was strip out a little to get to the part I wanted.

#right(cgi.QUERY_STRING,(len(cgi.QUERY_STRING)-37))#

 

Votes

Translate

Translate
Enthusiast ,
Apr 15, 2023 Apr 15, 2023

Copy link to clipboard

Copied

LATEST

I managed to resolve this myself. I did a dump of all CGI variables and found that the original URL was indeed present in a couple of places

 

All I needed to do was strip out a little to get to the part I wanted.

#right(cgi.QUERY_STRING,(len(cgi.QUERY_STRING)-37))#

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation