Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Using a URL like http://server/index.php?sid=12345&lang=de

  • martinvilange
  • martinvilange's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 9 months ago #109820 by martinvilange
I want to use a URL format like

http://server/index.php?sid=12345&lang=de

instead of a format like

http://newserver/index.php/12345/lang-de
or
http://newserver/index.php?r=survey/index/sid/12345/lang/de

after upgrading Limesurvey from 1.90+ Build 9642 to 2.05+ Build
140404.

Background
==========

I'm migrating our Limesurvey-Server to another
machine.

This involves upgrading from

1. Debian GNU/Linux 6.0.7 to Debian GNU/Linux 7.4
2. apache2 2.2.16-6+squeeze11 to apache2 2.2.22-13+deb7u1
3. php5 5.3.3-7+squeeze15 to php5 5.4.4-14+deb7u8
4. limesurvey 1.90+ Build 9642 to limesurvey 2.05+ Build 140404

The database runs on another system and its version is not affected by the
migration: mysql-server-5.1 5.1.49-1~bpo50+1

So far, the migration worked well, but ...

With the old server, I access the surveys using URLs like:

http://oldserver/index.php?sid=12345&lang=de

while with the new machine, I access the surveys using URLs like:

http://newserver/index.php?r=survey/index/sid/12345/lang/de

(After changing urlFormat in config.php form 'get' to 'path', I
got http://newserver/index.php/12345/lang-de)

Right now, the only solution, I can see, is some mod_rewrite
magic, either in .htaccess or in the apache configuration itself.

Any ideas?

Martin
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 9 months ago #109843 by DenisChenu
Hi,

With url like this : http://newserver/index.php/12345/lang-de, you can use url like this : http://newserver/index.php?sid=12345&lang=de.

Give it a try

Denis

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 following user(s) said Thank You: martinvilange
The topic has been locked.
  • martinvilange
  • martinvilange's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 9 months ago #109892 by martinvilange
Thank you!

I'll test that ASAP and report back.

Martin
The topic has been locked.
  • martinvilange
  • martinvilange's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 9 months ago #109926 by martinvilange
I've done the tests:

1. To get a baseline: using http://oldserver/index.php?sid=12345&lang=de
Result: the appropriate survey.

2. Using http://newserver/index.php/12345/lang-de
Result: the appropriate survey.

3. Using http://newserver/index.php?sid=12345&lang=de

Result:
- the page "The following surveys are available:"
- the URL http://newserver/index.php/surveys/publiclist?lang=en

Since this looks like a redirect, I checked, what apache was doing:

- RewriteLog enabled in /etc/apache2/apache2.conf
- apache restarted.
- Test #2 and #3 repeated

Results:
- rewrite.log is empty
- in access.log: Test #2 is just a nice 200 response code.
- Test #3 is first a 200 response (that's ok -- I got something), followed by
Code:
10.200.ccc.ddd - - [11/Jun/2014:14:57:38 +0200] "GET /index.php/surveys/publiclist?lang=en HTTP/1.1" 200 3779 "http://newserver/index.php?sid=13513&newtest=Y&lang=de" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36"

So, there is a redirect.

My next step: checking .htaccess in LimeSurveys installation directory.

Martin
The topic has been locked.
More
9 years 7 months ago #111401 by ahmadaub
Any updates how to make the new version read old URLs?
The topic has been locked.
  • martinvilange
  • martinvilange's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 7 months ago #111410 by martinvilange
Unfortunally, I've no technical update.

Right now, I've got professional support.

Martin
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose