curtiskoelling/Project-SeerStone/master/www/.htaccess
RewriteEngine on
#force HTTPS
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
RewriteBase /
#if for an existing directory or file
RewriteCond %{SCRIPT_FILENAME} -d
RewriteCond %{SCRIPT_FILENAME} -f
#then do nothing
RewriteRule . - [L]
#otherwise
#if it is for a slug (assuming alphanumeric and dashes), send to single
#RewriteRule ^([-a-zA-Z0-9]+)/?$ index.php?id=$1 [L]
RewriteRule ^bulletin/([_-a-zA-Z0-9]+)/?$ bulletin.php?$1 [L,NC]
RewriteRule ^bulletin/file/([_-a-zA-Z0-9]+)/?.pdf$ bulletin.php?file=$1 [L,NC]
#if a category
RewriteRule ^view/([_-a-zA-Z0-9]+)/?$ viewer.php?id=$1 [L,NC]
RewriteRule ^view/js/([_-a-zA-Z0-9]+)/?$ viewer.php?js=1&id=$1 [L,NC]
RewriteRule ^view/style/([_-a-zA-Z0-9]+)/?$ viewer.php?style=1&id=$1 [L,NC]
RewriteRule ^view/([_-a-zA-Z0-9]+)/edit/?$ viewer.php?id=$1&edit=true [L,NC]
RewriteRule ^view/([_-a-zA-Z0-9]+)/([_-a-zA-Z0-9]+)/?$ viewer.php?id=$1&arg=$2 [L,NC]
RewriteRule ^action/([_-a-zA-Z0-9]+)/?$ action.php?id=$1 [L,NC]
RewriteRule ^photo/upload/?$ photo.php?upload=true [L,NC]
RewriteRule ^photo/uploaded/([_-a-zA-Z0-9]+)/?$ photo.php?uploaded=true&id=$1&face=0 [L,NC]
RewriteRule ^photo/uploaded/([_-a-zA-Z0-9]+)/([_-a-zA-Z0-9]+)/?$ photo.php?uploaded=true&id=$1&face=$2 [L,NC]
RewriteRule ^photo/([_-a-zA-Z0-9]+)/?$ photo.php?id=$1 [L,NC]
RewriteRule ^photo/([_-a-zA-Z0-9]+)/([_-a-zA-Z0-9]+)/?$ photo.php?id=$1&size=$2 [L,NC]
RewriteRule ^registration/?$ registration.php?step=login [L,NC]
RewriteRule ^registration/([_-a-zA-Z0-9]+)/?$ registration.php?step=$1 [L,NC]
RewriteRule ^registration/js/([_-a-zA-Z0-9]+)/?$ registration.php?js=$1 [L,NC]
RewriteRule ^registration/style/([_-a-zA-Z0-9]+)/?$ registration.php?style=$1 [L,NC]
#rewrite testing target for configuration check
RewriteRule ^target setup/target.php [L]
AddType text/cache-manifest .manifest
On Github License
Files
Download PDF of Htaccess file