Welcome to the LimeSurvey Community Forum

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

Wong URL generated for sub-domain installation

  • HolmesSherlock
  • HolmesSherlock's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 11 months ago #136599 by HolmesSherlock
Wong URL generated for sub-domain installation was created by HolmesSherlock
I have installed Lime Survey inside a directory named 'survey' on my domain. Therefore, admin panel can either be accessed via subdomain.domain/index.php/admin or http://domain/survey/index.php/admin. In my survey, I have used a few images. Surprisingly, if I use the second URL generated image URLs are correct: http://domain/survey/upload/surveys//images/. However, if I use the former admin URL, generated image URLs are IN-correct: subdomain.domain/survey/ upload/surveys/<id>/images/<image>.

Is there any workaround to fix the issue?
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 11 months ago #136601 by holch
Limesurvey usually creates the URL based from where you log into the admin interface. Usually that works pretty good, but depending on your hosting environment, it might not.

Previously you could adapt the base url via the config file. I don't know if this is still possible with LS 2.5.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 11 months ago #136602 by holch
Ohhh, of course the second domain can't work. You included the /survey/ part. But usually the subdomain is directed to this folder already, so if you take the /survey/ part out of the second example with the subdomain it should work.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • HolmesSherlock
  • HolmesSherlock's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 11 months ago #136622 by HolmesSherlock
Replied by HolmesSherlock on topic Wong URL generated for sub-domain installation

...so if you take the /survey/ part out of the second example with the subdomain it should work


Yes, subdomain is already mapped inside the 'survey' folder. But, the image URLs contain 'survey' as part of the path. How can I configure Lime Survey to strip it off? I think there should be some workaround, because the subdomain looks more professional to me.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 11 months ago #136625 by holch
So this second URL is generated by Limesurvey?

Then this is either a misconfiguration at the server / subdomain level, or a new bug in Limesurvey. What version of LS are you running?

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • HolmesSherlock
  • HolmesSherlock's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 11 months ago - 7 years 11 months ago #136627 by HolmesSherlock
Replied by HolmesSherlock on topic Wrong URL generated for sub-domain installation

holch wrote: So this second URL is generated by Limesurvey?

Then this is either a misconfiguration at the server / subdomain level, or a new bug in Limesurvey. What version of LS are you running?


Yes, the URL is generated by LS. I am uploading the images to be embedded inside the survey, These are the URLs of the uploaded images.

I am running LS Version 2.50+ Build 160523. I used Installatron on cPanel on a Godaddy hosting to install LS. Kindly let me know what more information you need.
Last edit: 7 years 11 months ago by HolmesSherlock.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 11 months ago #136644 by DenisChenu
Replied by DenisChenu on topic Wrong URL generated for sub-domain installation
Think set the hostInfo fix this issue.
manual.limesurvey.org/Optional_settings#Request_settings

But then you 'force" you admin to use subdomain.example.com url.

I didn't see how to fix this :
- Have different url with/without directory
- Have the picture with the good url , always.

Maybe adding www.w3.org/TR/html-markup/base.html system to whole system. But
- It's a major fix
- It's a minor issue (user go to a single url, and you can use abolute url too for you picture)

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 topic has been locked.
More
7 years 11 months ago #136652 by Ben_V

DenisChenu wrote:
But then you 'force" you admin to use subdomain.example.com url.

Denis


In the root htaccess file of your domain, adapt & try:
Code:
Redirect 301 /limesurvey http://limesurvey.example.org

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose