shorter url of the survey

Mehr
3 Jahre 5 Monate her #103082 von mrli999
mrli999 erstellte das Thema shorter url of the survey
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.

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 5 Monate her #103083 von supercosh
supercosh antwortete auf das Thema: shorter url of the survey
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
Folgende Benutzer bedankten sich: mrli999

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 5 Monate her #103084 von fransmarcelissen
fransmarcelissen antwortete auf das Thema: shorter url of the survey
Hi,
Is www.domain.com/index.php/546753 what you are looking for?
Frans
Folgende Benutzer bedankten sich: mrli999

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 5 Monate her #103085 von mrli999
mrli999 antwortete auf das Thema: shorter url of the survey

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.

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 5 Monate her - 3 Jahre 5 Monate her #103086 von fransmarcelissen
fransmarcelissen antwortete auf das Thema: shorter url of the survey
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: 3 Jahre 5 Monate her von fransmarcelissen.
Folgende Benutzer bedankten sich: mrli999

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 5 Monate her #103087 von supercosh
supercosh antwortete auf das Thema: shorter url of the survey

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
Folgende Benutzer bedankten sich: mrli999

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 5 Monate her - 3 Jahre 5 Monate her #103088 von mrli999
mrli999 antwortete auf das Thema: shorter url of the survey

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: 3 Jahre 5 Monate her von mrli999.

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 5 Monate her #103089 von supercosh
supercosh antwortete auf das Thema: shorter url of the survey
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
Folgende Benutzer bedankten sich: mrli999

Bitte Anmelden um der Konversation beizutretten.

Mehr
3 Jahre 5 Monate her - 3 Jahre 5 Monate her #103090 von fransmarcelissen
fransmarcelissen antwortete auf das Thema: shorter url of the survey
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: 3 Jahre 5 Monate her von fransmarcelissen.
Folgende Benutzer bedankten sich: mrli999

Bitte Anmelden um der Konversation beizutretten.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten