# VoC Portal — public webroot
Options -Indexes

RewriteEngine On

# Short survey links:  /s/abcd1234  ->  /s/index.php?slug=abcd1234
# (character class includes "-" since custom slugs may contain hyphens)
RewriteRule ^s/([A-Za-z0-9-]+)/?$ s/index.php?slug=$1 [L,QSA]

# Enrollment links:  /e/abcd1234  ->  /e/index.php?slug=abcd1234
RewriteRule ^e/([A-Za-z0-9-]+)/?$ e/index.php?slug=$1 [L,QSA]

# Assessment links:  /a/abcd1234  ->  /a/index.php?slug=abcd1234
RewriteRule ^a/([A-Za-z0-9-]+)/?$ a/index.php?slug=$1 [L,QSA]

# Default document
DirectoryIndex index.php

# Block dotfiles
<FilesMatch "^\.">
  Require all denied
</FilesMatch>

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php82” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php82 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
