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

More
3 years 5 months ago #109820 by martinvilange
martinvilange created the topic: Using a URL like http://server/index.php?sid=12345&lang=de
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

Please Log in to join the conversation.

More
3 years 5 months ago #109843 by DenisChenu
DenisChenu replied the topic: Using a URL like http://server/index.php?sid=12345&lang=de
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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: martinvilange

Please Log in to join the conversation.

More
3 years 5 months ago #109892 by martinvilange
martinvilange replied the topic: Using a URL like http://server/index.php?sid=12345&lang=de
Thank you!

I'll test that ASAP and report back.

Martin

Please Log in to join the conversation.

More
3 years 5 months ago #109926 by martinvilange
martinvilange replied the topic: Using a URL like http://server/index.php?sid=12345&lang=de
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
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

Please Log in to join the conversation.

More
3 years 3 months ago #111401 by ahmadaub
ahmadaub replied the topic: Using a URL like http://server/index.php?sid=12345&lang=de
Any updates how to make the new version read old URLs?

Please Log in to join the conversation.

More
3 years 3 months ago #111410 by martinvilange
martinvilange replied the topic: Using a URL like http://server/index.php?sid=12345&lang=de
Unfortunally, I've no technical update.

Right now, I've got professional support.

Martin

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!