james-dibble/AdvancedWebAssignment/master/Public/.htaccess - Htaccess File

james-dibble/AdvancedWebAssignment/master/Public/.htaccess

ErrorDocument 404 /index.php?controller=errors&action=notfound
RewriteEngine on
RewriteBase /~j3-dibble/atwd/

RewriteRule ^crimes[/]*$ CrimeRecord.xsd [NC,L]
RewriteRule ^crimes/([0-9]{1}[-]{1}[0-9]{4})/post/([A-Za-z_]+)/([A-Za-z_]+)/(.*)/(xml|json)$ index.php?controller=crimes&action=post&regionName=$2&newArea=$3&areaData=$4&format=$5&noCache=1 [NC,L]
RewriteRule ^crimes/([0-9]{1}[-]{1}[0-9]{4})/put/([A-Za-z_]+)/([A-Za-z_]+)/(.*)/(xml|json)$ index.php?controller=crimes&action=put&regionName=$2&areaName=$3&changedStatistics=$4&format=$5&noCache=1 [NC,L]
RewriteRule ^crimes/([0-9]{1}[-]{1}[0-9]{4})/delete/(.*)/(xml|json)$ index.php?controller=crimes&action=delete&year=$1&areaName=$2&format=$3&noCache=1 [NC,L]
RewriteRule ^crimes/([0-9]{1}[-]{1}[0-9]{4})/(xml|json)$ index.php?controller=crimes&action=get&year=$1&format=$2 [NC,L]
RewriteRule ^crimes/([0-9]{1}[-]{1}[0-9]{4})/([A-Za-z_]+)/(xml|json)$ index.php?controller=crimes&action=getforregion&year=$1&region=$2&format=$3 [NC,L]
RewriteRule ^crimes/([0-9]{1}[-]{1}[0-9]{4})/([A-Za-z_]+)/([A-Za-z_]+)/(xml|json)$ index.php?controller=crimes&action=getforarea&year=$1&areaName=$3&format=$4 [NC,L]
RewriteRule ^crimes/doc/index.html$ index.php?controller=documentation&action=index [NC,L]
RewriteRule ^crimes/doc/source/(.*)$ index.php?controller=documentation&action=source&path=$1&noCache=1 [NC,L]
RewriteRule ^crimes/types/(xml|json)$ index.php?controller=crimes&action=getcrimetypes&format=$1 [NC,L]
RewriteRule ^locations/region/(xml|json)$ index.php?controller=locations&action=getregions&format=$1 [NC,L]
RewriteRule ^import/file[/]*$ index.php?controller=import&action=file&noCache=1 [NC,L]
RewriteRule ^import/text[/]*$ index.php?controller=import&action=text&noCache=1 [NC,L]
RewriteRule ^import/imported-data[/]*$ index.php?controller=import&action=importeddata [NC,L]
RewriteRule ^import/error[/]*$ index.php?controller=import&action=erroruploading [NC,L]
RewriteRule ^import[/]*$ index.php?controller=import&action=index [NC,L]
RewriteRule ^api[/]*$ index.php?controller=client&action=index [NC,L]
RewriteRule ^$ index.php?controller=home&action=index [NC,L]
RewriteRule ^(?:application|library)b.* index.php/$0 [L]

#Errors
RewriteRule ^crimes/(.*)$ index.php?controller=errors&action=uriunrecognized
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php?controller=errors&action=notfound [L]

On Github License

Files

Download PDF of Htaccess file
REQUEST_FILENAME

Comments

Apache