opengovfoundation/baltimorecode/master/htdocs/.htaccess - Htaccess File

opengovfoundation/baltimorecode/master/htdocs/.htaccess

# Specify our error pages.
ErrorDocument 404 /404.php

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

# If this is a request for a plain-text version of a page, translate the extention into a specific
# request.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*).txt$ /$1?plain_text=y [PT]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*).json$ /downloads/current/code-json/$1.json [PT]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*).xml$ /downloads/current/code-xml/$1.xml [PT]

# Requests for the terms page.
RewriteRule ^terms/$ /terms.php [QSA]

RewriteRule ^admin/ /index.php [L]
RewriteRule ^downloads/$ /index.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

On Github License

Files

Download PDF of Htaccess file
REQUEST_FILENAME

Comments

Apache