Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
11 lines (10 sloc) 602 Bytes
Options -MultiViews
RewriteEngine on
RewriteBase /
#RewriteCond %{HTTP_HOST} !^www.uk-postcodes.com$
#RewriteRule ^(.*)$ http://www.uk-postcodes.com/$1 [R=301]
RewriteRule ^postcode/(all)\.?(xml|json|rdf|csv)?$ all.php?format=$2 [NC]
RewriteCond %{QUERY_STRING} callback=(.*)
RewriteRule ^postcode/([a-z0-9\ ]+)\.?(xml|json|rdf|csv)?$ postcode.php?postcode=$1&format=$2&callback=%1 [NC]
RewriteRule ^postcode/([a-z0-9\ ]+)\.?(xml|json|rdf|csv)?$ postcode.php?postcode=$1&format=$2 [NC]
RewriteRule ^latlng/([0-9.]+),([-0-9.]+)(\.xml|\.json|\.rdf|\.csv)?$ postcode.php?lat=$1&lng=$2&format=$3 [NC,QSA]