- Posts: 965
- Thank you received: 218
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Use a local URL-shortifyer
- tammo
- Topic Author
- Offline
- Official LimeSurvey Partner
Less
More
2 years 7 months ago - 2 years 7 months ago #219342
by tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Use a local URL-shortifyer was created by tammo
A link for a survey has the following structure:
my.website.xx/index.php/123456?lang=en and possibly some extra characters for the token and or fields for prefilling.
I would like to make this shorter, like:
my.website.xx/JYRECJ
Of course URL shortening can be done via an external service, but that may be seen as a privacy issue, just like using Google fonts of Google Analytics.
I looked around and found some possible solutions, but since I am not a coder, I have no idea how to implement these features in LimeSurvey.
And to expand them, for example when using tokens, to something like:
my.website.xx/JYRECJ/UHNNJI where the last part is the token.
Has anyone experimented with this? What are pros and cons?
Tammo
my.website.xx/index.php/123456?lang=en and possibly some extra characters for the token and or fields for prefilling.
I would like to make this shorter, like:
my.website.xx/JYRECJ
Of course URL shortening can be done via an external service, but that may be seen as a privacy issue, just like using Google fonts of Google Analytics.
I looked around and found some possible solutions, but since I am not a coder, I have no idea how to implement these features in LimeSurvey.
And to expand them, for example when using tokens, to something like:
my.website.xx/JYRECJ/UHNNJI where the last part is the token.
Has anyone experimented with this? What are pros and cons?
Tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Last edit: 2 years 7 months ago by tammo. Reason: typo
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
2 years 7 months ago #219353
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Use a local URL-shortifyer
htaccess redirect for a one time process ?
Else : to have a cleaner solution :
need a plugin can you test my.example.org/123456?lang=en to check if url rewriting work ?
Else : to have a cleaner solution :
need a plugin can you test my.example.org/123456?lang=en to check if url rewriting work ?
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- tammo
- Topic Author
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 965
- Thank you received: 218
2 years 7 months ago #219374
by tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Replied by tammo on topic Use a local URL-shortifyer
Hi Denis,
of course I can use a .htaccess rule. But I want to give users a possiblity without using difficult (for them) statements.
Use case: LimeSurvey installation for use by communication professionals, not IT
I do not understand the second part of your post.
Tammo
of course I can use a .htaccess rule. But I want to give users a possiblity without using difficult (for them) statements.
Use case: LimeSurvey installation for use by communication professionals, not IT
I do not understand the second part of your post.
Tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
2 years 7 months ago #219377
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Use a local URL-shortifyer
For the second part : if url rewriting without index.php didn't work : there are no way to interrupt example.org/mylilurl
If url rewriting work : a plugin can do something.
Else another way :
github.com/ldidry/lstu
framagit.org/fiat-tux/hat-softwares/lstu
Sorry : french manual : docs.framasoft.org/fr/lstu/
If url rewriting work : a plugin can do something.
Else another way :
github.com/ldidry/lstu
framagit.org/fiat-tux/hat-softwares/lstu
Sorry : french manual : docs.framasoft.org/fr/lstu/
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
2 years 7 months ago #219381
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Use a local URL-shortifyer
Removing index.php:
- manual.limesurvey.org/Optional_settings#URL_settings
Code:
'urlManager' => array( 'urlFormat' => 'path', 'rules' => array( // You can add your own rules here ), 'showScriptName' => false, // Set to false to remove /index.php from the URLs ),
- manual.limesurvey.org/Optional_settings#URL_settings
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu, tammo
The topic has been locked.
- tammo
- Topic Author
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 965
- Thank you received: 218
2 years 7 months ago #219400
by tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
Replied by tammo on topic Use a local URL-shortifyer
Thank you. That is a good first step.
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
- davebostockgmail
- Offline
- Elite Member
Less
More
- Posts: 166
- Thank you received: 26
2 years 6 months ago #220592
by davebostockgmail
Replied by davebostockgmail on topic Use a local URL-shortifyer
Could you not just use php to read the token and redirect?
Example 1 : no token
filename on my.website.xx : JYRECJ.php
Address my.website.xx/JYRECJ.php
with the content
<?php
header("location: https://server/index.php/surveyID?newtest=Y");
?>
Example 2 : with token
filename on my.website.xx : JYRECJ.php
Address my.website.xx/JYRECJ.php&t=UHNNJI
with the content
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
$tokenID=mysqli_real_escape_string($db,$_GET);
header("location: https://server/index.php/surveyID?token=$tokenID}&newtest=Y");
?>
Example 1 : no token
filename on my.website.xx : JYRECJ.php
Address my.website.xx/JYRECJ.php
with the content
<?php
header("location: https://server/index.php/surveyID?newtest=Y");
?>
Example 2 : with token
filename on my.website.xx : JYRECJ.php
Address my.website.xx/JYRECJ.php&t=UHNNJI
with the content
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
$tokenID=mysqli_real_escape_string($db,$_GET);
header("location: https://server/index.php/surveyID?token=$tokenID}&newtest=Y");
?>
The topic has been locked.