cmbirk/chicagocode.org/master/htdocs/.htaccess - Htaccess File

cmbirk/chicagocode.org/master/htdocs/.htaccess

DirectoryIndex index.php

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

RewriteEngine On
RewriteBase /

### SAMPLE REWRITERULES ###

# Requests for a specific law.
#RewriteRule ^([0-9A-Za-z.]{1,4})-([0-9A-Za-z.]{1,4})-([0-9A-Za-z.]{1,4})/$ /law.php?section_number=$1-$2-$3 [QSA]
RewriteRule ^((?:[0-9A-Za-z.]+-)+(?:[0-9A-Za-z.]+))/$ /law.php?section_number=$1 [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

Comments

Apache