Welcome, Guest
Username: Password: Remember me

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

Using a URL like http://server/index.php?sid=12​345&lang=de 3 months 1 week ago #109820

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 administrator has disabled public write access.

Using a URL like http://server/index.php?sid=12​345&lang=de 3 months 1 week ago #109843

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6334
  • Thank you received: 818
  • Karma: 243
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
The administrator has disabled public write access.
The following user(s) said Thank You: martinvilange

Using a URL like http://server/index.php?sid=12​345&lang=de 3 months 1 week ago #109892

Thank you!

I'll test that ASAP and report back.

Martin
The administrator has disabled public write access.

Using a URL like http://server/index.php?sid=12​345&lang=de 3 months 1 week ago #109926

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
The administrator has disabled public write access.

Using a URL like http://server/index.php?sid=12​345&lang=de 1 month 2 weeks ago #111401

  • ahmadaub
  • ahmadaub's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
Any updates how to make the new version read old URLs?
The administrator has disabled public write access.

Using a URL like http://server/index.php?sid=12​345&lang=de 1 month 2 weeks ago #111410

Unfortunally, I've no technical update.

Right now, I've got professional support.

Martin
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.156 seconds
Donation Image