RewriteEngine On RewriteCond %{HTTPS} !=on RewriteCond %{ENV:HTTPS} !=on RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L] #Remove html extension. #RewriteRule ^([^\.]+)$ $1.html [NC,L] #Remove extension and add trailing slash RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^/]+)/$ $1.html RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.html RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$ RewriteRule (.*)$ /$1/ [R=301,L] #Old URLs. Don't use them anymore publically. Redirect /patroneo.git https://git.laborejo.org/lss/patroneo Redirect /laborejo.git https://git.laborejo.org/lss/laborejo Redirect /fluajhjo.git https://git.laborejo.org/lss/fluajho Redirect /vico.git https://git.laborejo.org/lss/vico