Welcome to the LimeSurvey Community Forum

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

Remove index.php from URL

  • Matadeleo
  • Matadeleo's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
6 years 1 week ago #167120 by Matadeleo
Remove index.php from URL was created by Matadeleo
Hi,

I'm just wondering, purely for aesthetic purposes and to shorten links that can be quite long, whether it's possible to remove the index.php controller page from the URL?

I believe LimeSurvey is ran on the Yii framework, which I don't have any experience with, but I know that in similar frameworks e.g. Codeigniter, you can remove it like this:

- Step 1: set
Code:
config['index']
from: "index.php" => ""

- Step 2: Set in .htaccess:
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 1 week ago #167129 by Joffm
Replied by Joffm on topic Remove index.php from URL
Hi,
I suppose you talk about the survey url.
I can open a survey by entering " www.myServer.com/ [LS_Installation_folder]/[surveyID]"
or - with a subdomain "survey.myServer.com/[surveyID]"

Or did you talk about something different?

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • Matadeleo
  • Matadeleo's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
6 years 1 week ago #167145 by Matadeleo
Replied by Matadeleo on topic Remove index.php from URL
Hi Joffm,

No, the solution to what you describe is simply to install in root folder, which I have done already. What I refer to is the index.php controller page in the URL.

For example, link looks like this:

www.myServer.com/ index.php/[surveyID]


In many frameworks it's possible to remove the index.php from the URL for aesthetic reasons.

See section 2

www.yiiframework.com/doc/guide/1.1/en/topics.url#hiding-x-23x
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose