Skip to content

Login redirect issue #2765

Description

@samlar

Describe the bug
This bug has been fixed in previous version but has recurred, old case: #1048

After logging, a redirection occurs to https://test.se/BookStack/BookStack. Normally is https://test.se/BookStack. And an error message shows up saying Sorry, The page you were looking for could not be found. Still login is successful and there are no other issues. Im using Subdirectory Setup and more about my configuration down below.

Temporary workaround that works for me now is, this is set in apache virtual conf:
Redirect temp /BookStack/BookStack https://test.se/BookStack

Steps To Reproduce
See above.

Expected behavior
No redirection should occur.

Screenshots
N/A

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): v21.04.5
  • PHP Version: PHP 7.3.27-1
  • Hosting Method (Nginx/Apache/Docker): Apache/2.4.38

Additional context
Apache configuration:

<IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerName www.test.se
        ServerAlias test.se

        ServerAdmin test@test.se
        DocumentRoot /var/www/test

        # BookStack Configuration
        Alias "/BookStack" "/var/www/BookStack/public"

        Redirect temp /BookStack/BookStack https://test.se/BookStack

       <Directory "/var/www/BookStack/public">
       Options FollowSymlinks
       AllowOverride None
       Require all granted

       RewriteEngine On
       # Redirect Trailing Slashes If Not A Folder...
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule ^(.*)/$ /$1 [L,R=301]

       # Handle Front Controller...
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteRule ^ index.php [L]
       </Directory>

      <Directory "/var/www/BookStack">
      AllowOverride None
      Require all denied
      </Directory>
      # End BookStack Configuration

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/test.se/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/test.se/privkey.pem
</VirtualHost>
</IfModule>

.env configuration APP_URL=https://test.se/BookStack

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions