Welcome, Guest
Username: Password: Remember me

TOPIC: shorter url of the survey

shorter url of the survey 10 months 3 weeks ago #103082

  • mrli999
  • mrli999's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 95
  • Thank you received: 2
  • Karma: 0
I created a survey which's sid is 546753.

And when access www.domain.com/survey.546753.php, I come to list page of this survey. Then I have to click the name to enter the survey.

Is it possible for me to directly enter the survey using www.domain.com/survey.546753.php? And how?

Is it possbile through edit the config.php or routes.php?

Thanks.
The administrator has disabled public write access.

shorter url of the survey 10 months 2 weeks ago #103083

  • supercosh
  • supercosh's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 25
  • Thank you received: 9
  • Karma: 1
Hi

Yes you could:
www.example.com/index.php/789456

Or if you use tokens:
www.example.com/index.php/789456?token=ABCDEFG

Regards
Gregor
The administrator has disabled public write access.
The following user(s) said Thank You: mrli999

shorter url of the survey 10 months 2 weeks ago #103084

  • fransmarcelissen
  • fransmarcelissen's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 169
  • Thank you received: 31
  • Karma: 10
Hi,
Is www.domain.com/index.php/546753 what you are looking for?
Frans
The administrator has disabled public write access.
The following user(s) said Thank You: mrli999

shorter url of the survey 10 months 2 weeks ago #103085

  • mrli999
  • mrli999's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 95
  • Thank you received: 2
  • Karma: 0
fransmarcelissen wrote:
Hi,
Is www.domain.com/index.php/546753 what you are looking for?
Frans

The limesurvey system is install in the directory: www.domain.cm/survey/

And we did can access the survey through: www.domain.com/survey/index.php/789456, but the address is a little long.

I tried to access the survey through: www.domain.com/survey/789456.php, but come the list page, I hope can directly access the survey, not the list page.
The administrator has disabled public write access.

shorter url of the survey 10 months 2 weeks ago #103086

  • fransmarcelissen
  • fransmarcelissen's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 169
  • Thank you received: 31
  • Karma: 10
Hi,
If www.domain.com/survey/index.php/789456 is too long, you could create a file like www.domain.com/mysurvey.php (probably /var/www/mysurvey.php), with a redirect as content (
<?php
header('Location: www.domain.com/survey/index.php/789456');
?>
Now you can access the survey with www.domain.com/mysurvey.php
Better?
Frans
Last Edit: 10 months 2 weeks ago by fransmarcelissen.
The administrator has disabled public write access.
The following user(s) said Thank You: mrli999

shorter url of the survey 10 months 2 weeks ago #103087

  • supercosh
  • supercosh's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 25
  • Thank you received: 9
  • Karma: 1
mrli999 wrote:
And we did can access the survey through: www.domain.com/survey/index.php/789456, but the address is a little long.

You could also use a URL shortener like bitly.com or write your own redirector, like we do on the commercial LimeSurvey platform dreifragen.net (german). Our URL's then look like this: www.dreifragen.net/u/789456.

With mod_rewrite and .htaccess, these requests are simply rewritten to the original long url then.

Regards
Gregor
The administrator has disabled public write access.
The following user(s) said Thank You: mrli999

shorter url of the survey 10 months 2 weeks ago #103088

  • mrli999
  • mrli999's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 95
  • Thank you received: 2
  • Karma: 0
fransmarcelissen wrote:
Hi,
If www.domain.com/survey/index.php/789456 is too long, you could create a file like www.domain.com/mysurvey.php (probably /var/www/mysurvey.php), with a redirect as content (
<?php
header('Location: www.domain.com/survey/index.php/789456');
?>
Now you can access the survey with www.domain.com/mysurvey.php
Better?
Frans

It is OK. But we have to create a new php file every survey. thanks

I hope to find some solution, so that we can access the survey through:www.domain.com/survey/987456.php
Last Edit: 10 months 2 weeks ago by mrli999.
The administrator has disabled public write access.

shorter url of the survey 10 months 2 weeks ago #103089

  • supercosh
  • supercosh's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 25
  • Thank you received: 9
  • Karma: 1
If you are taking into consideration my suggestion with mod_rewrite and .htaccess, you will never have to create a php file ... mod_rewrite recognizes the request /u/123456 and rewrites it automatically to www.example.com/survey/index.php/123456

Also Frans suggestion will need only one file, since the script may take a parameter, you parse it, and simply redirect.

Regards,
Gregor
The administrator has disabled public write access.
The following user(s) said Thank You: mrli999

shorter url of the survey 10 months 2 weeks ago #103090

  • fransmarcelissen
  • fransmarcelissen's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 169
  • Thank you received: 31
  • Karma: 10
Something like (untested, I am not a php programmer)
<?php
header('Location: www.domain.com/survey/index.php/'.$_GET ["sid"]);
?>
and www.domain.com/mysurvey.php?sid=123456
Last Edit: 10 months 2 weeks ago by fransmarcelissen.
The administrator has disabled public write access.
The following user(s) said Thank You: mrli999
Moderators: ITEd
Time to create page: 0.109 seconds
Donation Image