Welcome to the LimeSurvey Community Forum

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

Permalink Issue - IIS Installation

  • bnichols
  • bnichols's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 9 months ago #170326 by bnichols
Permalink Issue - IIS Installation was created by bnichols
Hi Everyone,

I was hoping someone may be able to point me in the right direct. I have LimeSurvey setup on IIS, running with a MySQL database. Works really well, although I have found an issue with some of the links after deleting questions/surveys.

surveys.mydomain.com/index.php?r=admin/s...ons/surveyid/1?gid=7
The above URL was forbidden after deleting a single question.

Note the double ampersand being used (?r=admin and ?gid=7).

Changing the URL to:
surveys.mydomain.com/index.php?r=admin/s...ons&surveyid=1&gid=7
does work however.

I converted the .htaccess file to a web.config file, as per below:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Imported Rule 1">
                    <match url="." ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php" />
                </rule>
            </rules>
        </rewrite>
        <httpErrors errorMode="Detailed" />
    </system.webServer>
</configuration>

The .htaccess file being:
Code:
<IfModule mod_rewrite.c>
    RewriteEngine on
 
    # if a directory or a file exists, use it directly
    RewriteCond %{REQUEST_FILENAME} !-f
    # RewriteCond %{REQUEST_FILENAME} !-d

    # otherwise forward it to index.php
    RewriteRule . index.php
</IfModule>
# General setting to properly handle LimeSurvey paths
# AcceptPathInfo on

If anyone has any suggestions it would be greatly appreciated.

I've tried:
  • Removing the line where matchType="IsDirectory" - This results in not being able to access the admin page
  • Removing the conditions completely - This also results in not being able to access the admin page
The topic has been locked.
More
5 years 6 months ago #173998 by LTC
Replied by LTC on topic Permalink Issue - IIS Installation
Try this as well in your config.php file:

'urlManager' => array(
'urlFormat' => 'path',
'rules' => array(
// You can add your own rules here
'<sid:\d+>' => array('survey/index','urlSuffix'=>'.html','matchValue'=>true),
),
'showScriptName' => false,
),
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 6 months ago #174023 by DenisChenu
Replied by DenisChenu on topic Permalink Issue - IIS Installation

bnichols wrote: …

surveys.mydomain.com/index.php?r=admin/s...ons/surveyid/1?gid=7
The above URL was forbidden after deleting a single question.

Note the double ampersand being used (?r=admin and ?gid=7).

It's a bug on LimeSurvey, if it's in last version : please report.

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.

Lime-years ahead

Online-surveys for every purse and purpose