LimeSurvey:跳过 "The following surveys are available" 页?
LimeSurvey: Skip "The following surveys are available" Page?
我最近安装了最新的 LimeSurvey,虽然它有很多我喜欢的功能,但我真的只打算在 survey.example.com 子域中提供一项调查。
我想跳过声明 "The following surveys are available:" 的页面,即 "survey.example.com/index.php"
。并直接进入调查,即"survey.example.com/index.php/311746?lang=en"
我尝试在 .htaccess 中设置 DirectoryIndex,但没有任何效果
DirectoryIndex index.php/311746?lang=en
我试过 mod_rewrite,但 LimeSurvey 本身已经设置了条件,所以无论我倾向于做什么都会破坏他们的条件(可能是因为他们已经在重写 index.php)。
<IfModule mod_rewrite.c>
RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
# otherwise forward it to index.php
RewriteRule . index.php
</IfModule>
我本来打算尝试重定向,但 index.php 不仅仅是索引,所以我不想更改太多。
我尝试四处搜索,但运气不佳。
那为什么不重写调查的主要规则呢。不要将它重写到您不想做的主要 index.php 中,而是将其直接写到您想要的调查中。您应该能够在您的 htaccess 中使用它直接进入调查。
<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 the survey
RewriteRule . index.php/311746?lang=en [R=301,L]
</IfModule>
如果这能解决您的问题,请告诉我
我最近安装了最新的 LimeSurvey,虽然它有很多我喜欢的功能,但我真的只打算在 survey.example.com 子域中提供一项调查。
我想跳过声明 "The following surveys are available:" 的页面,即 "survey.example.com/index.php"
。并直接进入调查,即"survey.example.com/index.php/311746?lang=en"
我尝试在 .htaccess 中设置 DirectoryIndex,但没有任何效果
DirectoryIndex index.php/311746?lang=en
我试过 mod_rewrite,但 LimeSurvey 本身已经设置了条件,所以无论我倾向于做什么都会破坏他们的条件(可能是因为他们已经在重写 index.php)。
<IfModule mod_rewrite.c>
RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
# otherwise forward it to index.php
RewriteRule . index.php
</IfModule>
我本来打算尝试重定向,但 index.php 不仅仅是索引,所以我不想更改太多。
我尝试四处搜索,但运气不佳。
那为什么不重写调查的主要规则呢。不要将它重写到您不想做的主要 index.php 中,而是将其直接写到您想要的调查中。您应该能够在您的 htaccess 中使用它直接进入调查。
<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 the survey
RewriteRule . index.php/311746?lang=en [R=301,L]
</IfModule>
如果这能解决您的问题,请告诉我