- Posts: 31
- Thank you received: 5
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
What determines the LimeSurvey route type?
- mhladun
- Topic Author
- Offline
- Junior Member
Our own server: CentOS / Apache 2.4 / PostgreSQL
Survey theme/template: Custom
==================
I've noticed code snippets across this forum and in the LimeSurvey manual using routes like index.php/admin/remotecontrol and index.php?r=admin/remotecontrol. What determines if an instance uses "slash endpoints" or "query string" endpoints?
Please Log in to join the conversation.
- holch
- Offline
- LimeSurvey Community Team
- Posts: 11660
- Thank you received: 2742
For the first URL to work I think your webserver must support mod_rewrite, I think.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Please Log in to join the conversation.
- mhladun
- Topic Author
- Offline
- Junior Member
- Posts: 31
- Thank you received: 5
When I visit "index.php?r=admin/remotecontrol", I get a list of API methods.
When I visit "index.php/admin/remotecontrol", I am taken to our LimeSurvey instance's homepage.
Our Apache configuration does not check for endpoint types and then redirect traffic based off that. Whatever endpoint I visit should be the endpoint that LimeSurvey/PHP uses to determine what view is rendered, right?
<VirtualHost *:80> ServerName DOMAIN DocumentRoot /var/www/html/limesurvey # force https RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L] </VirtualHost> <VirtualHost *:443> ServerName DOMAIN DocumentRoot /var/www/html/limesurvey <Directory "/var/www/html/limesurvey"> DirectoryIndex index.php index.html Options FollowSymLinks AllowOverride All Require all granted </Directory> </VirtualHost>
What else could be causing "index.php/admin/remotecontrol" not to work?
It's not just "index.php/admin/remotecontrol", by the way. Any "slash endpoints" do not work, only "query string" endpoints do.
Please Log in to join the conversation.
- holch
- Offline
- LimeSurvey Community Team
- Posts: 11660
- Thank you received: 2742
When I visit "index.php/admin/remotecontrol", I am taken to our LimeSurvey instance's homepage.
This, to me sounds like mod_rewrite is not working well for your installation.
Where is Limesurvey installed? With its own domain / subdomain, or as a subfolder of your website where there is another software like Wordpress or any CMS running?
Sometimes different .htaccess files can cause issues.
Also, how do you access your LS administration? How does the URL look like? (don't need to see the domain, etc., but rather the URL part after that.
E.g. subdomain.domain.tld/xyz/index.php/admin...hentication/sa/login
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Please Log in to join the conversation.
- mhladun
- Topic Author
- Offline
- Junior Member
- Posts: 31
- Thank you received: 5
The URL remains subdomain.domain/index.php/admin/remotecontrol , and it isn't changed to anything else.When I visit "index.php/admin/remotecontrol", I am taken to our LimeSurvey instance's homepage.
Our LS instance has it's own subdomain.
To access the admin portal, we visit "subdomain.domain.ca/index.php?r=admin/authentication/sa/login".
"subdomain.domain.ca/index.php/admin/authentication/sa/login" leads to our LS homepage, with the URL remaining unchanged (no browser redirect).
I can investigate .htaccess files, but all the ones I've come across are simply "Deny from all".
Please Log in to join the conversation.
- holch
- Offline
- LimeSurvey Community Team
- Posts: 11660
- Thank you received: 2742
To access the admin portal, we visit "subdomain.domain.ca/index.php?r=admin/authentication/sa/login".
"subdomain.domain.ca/index.php/admin/authentication/sa/login" leads to our LS homepage, with the URL remaining unchanged (no browser redirect).
This sounds to me like your webserver is not configured for mod_redirect. So I am not surprised that index.php/admin/remotecontrol doesn't work then. Because it is just index.php?r=admin/remotecontrol made "nicer" via mod_rewrite.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Please Log in to join the conversation.
- mhladun
- Topic Author
- Offline
- Junior Member
- Posts: 31
- Thank you received: 5
If LimeSurvey supports both formats, and I want users to be able to use either formats, I should be able to leave my Apache config the way it is, no? I haven't come across any other LS Apache configs that do any special rewrites to support endpoint types.
Please Log in to join the conversation.
- holch
- Offline
- LimeSurvey Community Team
- Posts: 11660
- Thank you received: 2742
httpd.apache.org/docs/current/mod/mod_rewrite.html
And yes, Limesurvey supports both formats, but I don't think at the same time. If mod_rewrite is own and you visit "subdomain.domain.ca/index.php?r=admin/authentication/sa/login" afaik it will always turn into "subdomain.domain.ca/index.php/admin/authentication/sa/login"
But I am not an expert on server configuration.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Please Log in to join the conversation.