Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: shorter url of the survey

shorter url of the survey 10 Monate 2 Wochen her #103082

  • mrli999
  • mrli999s Avatar
  • OFFLINE
  • Expert Lime
  • Beiträge: 95
  • Dank erhalten: 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.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

shorter url of the survey 10 Monate 2 Wochen her #103083

  • supercosh
  • supercoshs Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 25
  • Dank erhalten: 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
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: mrli999

shorter url of the survey 10 Monate 2 Wochen her #103084

Hi,
Is www.domain.com/index.php/546753 what you are looking for?
Frans
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: mrli999

shorter url of the survey 10 Monate 2 Wochen her #103085

  • mrli999
  • mrli999s Avatar
  • OFFLINE
  • Expert Lime
  • Beiträge: 95
  • Dank erhalten: 2
  • Karma: 0
fransmarcelissen schrieb:
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.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

shorter url of the survey 10 Monate 2 Wochen her #103086

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
Letzte Änderung: 10 Monate 2 Wochen her von fransmarcelissen.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: mrli999

shorter url of the survey 10 Monate 2 Wochen her #103087

  • supercosh
  • supercoshs Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 25
  • Dank erhalten: 9
  • Karma: 1
mrli999 schrieb:
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
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: mrli999

shorter url of the survey 10 Monate 2 Wochen her #103088

  • mrli999
  • mrli999s Avatar
  • OFFLINE
  • Expert Lime
  • Beiträge: 95
  • Dank erhalten: 2
  • Karma: 0
fransmarcelissen schrieb:
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
Letzte Änderung: 10 Monate 2 Wochen her von mrli999.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

shorter url of the survey 10 Monate 2 Wochen her #103089

  • supercosh
  • supercoshs Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 25
  • Dank erhalten: 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
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: mrli999

shorter url of the survey 10 Monate 2 Wochen her #103090

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
Letzte Änderung: 10 Monate 2 Wochen her von fransmarcelissen.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: mrli999
Moderatoren: ITEd
Ladezeit der Seite: 0.130 Sekunden
Donation Image