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

opengovfoundation/baltimoredecoded/master/htdocs/.htaccess

php_flag display_errors off

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

RewriteEngine On
RewriteBase /

### SAMPLE REWRITERULES ###

RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC]
RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]

#Searches
RewriteRule ^term/(.*)/?$ /search.php/?q=$1 [QSA]

# Requests for a specific law.
RewriteRule ^([0-9A-Za-z.]{1,4})-([0-9.:]{1,10})/$ /law.php?section_number=$1-$2 [QSA]

# Requests for a specific structural unit.
RewriteRule ^((([0-9A-Za-z.]{1,8})/)+)$ /structure.php [QSA]

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

# Requests for the API key registration page.
RewriteRule ^api-key/$ /api-key.php [QSA]

# If this is a request for a plain-text version of a page, translate the extention into a specific
# request.
RewriteRule ^(.*).txt$ /$1/?plain_text=y

On Github License

Files

Download PDF of Htaccess file
HTTP_HOST, REQUEST_URI

Comments

Apache