ServerName localhost:8080 ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined RewriteEngine On ########################################################################### # Set conservative/secure defaults AllowOverride None DirectoryIndex index.html Options -Indexes # Git Require all denied # Subversion Require all denied # Deny access to accidental uploads of macOS-specific directories and files # .DS_Store Require all denied # resource forks Require all denied ########################################################################### # CC Legal Tools # Directory Aliases Alias /status /var/www/git/cc-legal-tools-data/docs/status Alias /rdf /var/www/git/cc-legal-tools-data/docs/rdf Alias /publicdomain /var/www/git/cc-legal-tools-data/docs/publicdomain Alias /licenses /var/www/git/cc-legal-tools-data/docs/licenses Alias /cc-legal-tools /var/www/git/cc-legal-tools-data/docs/cc-legal-tools # File Aliases Alias /schema.rdf /var/www/git/cc-legal-tools-data/docs/rdf/schema.rdf Alias /ns.html /var/www/git/cc-legal-tools-data/docs/rdf/ns.html Alias /ns /var/www/git/cc-legal-tools-data/docs/rdf/ns.html # Disable .htaccess (for security and performance) AllowOverride None # Also serve HTML files without .html extension RewriteCond %{REQUEST_FILENAME}.html -f RewriteRule !.*\.html$ %{REQUEST_FILENAME}.html [L] # Redirect .../index.php to .../ RewriteCond %{REQUEST_FILENAME} "index\.php$" [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule (.*/)index\.php$ $1 [L,NC,R=301] # Deny access to PHP files (content should be only static files) RewriteRule .*\.php$ "-" [F,L] # Correct mimetype for .../rdf files RewriteRule (.*/rdf$) $1 [T=application/rdf+xml] Include /var/www/git/cc-legal-tools-data/config/language-redirects RedirectPermanent /licenses/mark/1.0 /publicdomain/mark/1.0 ########################################################################### # Chooser # Alias /choose /var/www/git/chooser/docs # # # Disable .htaccess (for security and performance) # AllowOverride None # # Redirect .../index.php to .../ # RewriteCond %{REQUEST_FILENAME} "index\.php$" [NC] # RewriteCond %{REQUEST_FILENAME} !-f # RewriteRule (.*/)index\.php$ $1 [L,NC,R=301] # # Deny access to PHP files (content should be only static files) # RewriteRule .*\.php "-" [F,L] # RedirectPermanent /choose/zero /choose RedirectPermanent /chooser /choose RedirectTemp /choose https://chooser-beta.creativecommons.org ########################################################################### # FAQ Alias /faq /var/www/git/faq/faq # Disable .htaccess (for security and performance) AllowOverride None # Redirect .../index.php to .../ RewriteCond %{REQUEST_FILENAME} "index\.php$" [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule (.*/)index\.php$ $1 [L,NC,R=301] # Deny access to PHP files (content should be only static files) RewriteRule .*\.php "-" [F,L] ########################################################################### # Platform Toolkit Alias /platform/toolkit /var/www/git/mp/docs # Disable .htaccess (for security and performance) AllowOverride None # Redirect .../index.php to .../ RewriteCond %{REQUEST_FILENAME} "index\.php$" [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule (.*/)index\.php$ $1 [L,NC,R=301] # Deny access to PHP files (content should be only static files) RewriteRule .*\.php "-" [F,L] ########################################################################### # WordPress/Default DocumentRoot /var/www/html # Expected configuration for WordPress # (see conf-available/docker-php.conf) AllowOverride All DirectoryIndex index.php index.html # WP-API RewriteRule ^(/wp-json/.*)$ /index.php$1 [L] # Permalinks (for dirs/files not found) # https://codex.wordpress.org/Using_Permalinks # Directory Conditions RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^/rdf RewriteCond %{REQUEST_URI} !^/publicdomain RewriteCond %{REQUEST_URI} !^/platform/toolkit RewriteCond %{REQUEST_URI} !^/licenses RewriteCond %{REQUEST_URI} !^/faq RewriteCond %{REQUEST_URI} !^/choose RewriteCond %{REQUEST_URI} !^/cc-legal-tools # File Conditions RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !^/schema.rdf$ RewriteCond %{REQUEST_URI} !^/ns.html$ RewriteCond %{REQUEST_URI} !^/ns$ # Rule RewriteRule . /index.php [L] # vim: ft=apache ts=4 sw=4 sts=4 sr et