Release v22.03.00 includes an update to improve the flexibility of routing, such that URLs with trailing slashes will automatically redirect to the URL without the trailing slash. This is an improvement on prior behavior where the redirect would be to the Submitty home page.

Follow these steps to enable this new functionality.

  1. Edit /etc/apache2/sites-available/submitty.conf and find the line:

     RewriteEngine On

    and append after it:

     # Routing Flexibility: Removes the trailing slash if it is supplied
     # Example: /courses/f21/csci1200/ -> /courses/f21/csci1200
     RewriteCond %{REQUEST_FILENAME} !-d
     RewriteCond %{REQUEST_URI} /(.*)/$
     RewriteRule ^ /%1 [R=301,L]
  2. Restart Apache

    sudo systemctl restart apache2.service