By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,162 Members | 1,038 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,162 IT Pros & Developers. It's quick & easy.

Help with redirecting incorrect unique links

lilp32
P: 43
I'm not sure this is even possible but here goes. I created a survey and each user was sent a link with an automatic login using the link and "&u=username". Links were sent out in a hard copy mailing. Unfortunately the mailing left out the "&" before the u=. Obviously the links don't work. Is there some way to create a redirect script for each incorrect unique link?
Feb 17 '11 #1
Share this Question
Share on Google+
4 Replies


jhardman
Expert 2.5K+
P: 3,405
put the whole url (or more or less the whole thing), I need to see what's behind that last argument.

Jared
Feb 19 '11 #2

lilp32
P: 43
Unfortunately the survey host has told me they won't put any new scripts up to help my situation. There doesn't seem to be much I can do on my end since the link isn't even reaching my survey. But just in case you can offer a suggestion, an example of the link is http://www.snapsurveys.com/swh/surve...83877519u=1000.
Feb 23 '11 #3

jhardman
Expert 2.5K+
P: 3,405
This will work, all of your data is being sent to the variable "k", you will just need to split it out:
Expand|Select|Wrap|Line Numbers
  1. if instr(request("k"), "u=") >0 then 'k contains "u="
  2.    k = left(request("k"), instr(request("k"), "u=")-1)
  3.    'truncates k to right before it encounters "u="
  4.    u = right(request("k"), len(request("k"))-instr(request("k"), "u=")-1)
  5.    'assigns everything after that to the variable u
  6. else 'no problem, url is formed correctly
  7.    k = request("k")
  8.    u = request("u")
  9. end if
After this you just need to use u and k instead of referring back to the request object. Let me know if this solves your problem.

Jared
Feb 23 '11 #4

lilp32
P: 43
Thanks for your help with this. Unfortunately I don't think I will be able to use this since I don't have access to the actual site, just to my individual survey.
Feb 23 '11 #5

Post your reply

Sign in to post your reply or Sign up for a free account.