HXLStandard/hxl-showcase/master/www/.htaccess - Htaccess File

HXLStandard/hxl-showcase/master/www/.htaccess

########################################################################
# Rewrite rules for clean URLs.
########################################################################

<ifmodule mod_rewrite.c>

RewriteEngine On

RewriteBase /

# General

RewriteRule ^$ index.php?p=home [QSA,L]

RewriteRule ^search$ index.php?p=search [QSA,L]

# Reports and downloads

RewriteRule ^report(?:.(csv|json|xml|n3))?$ index.php?p=report&format=$1 [QSA,L]

# Sources

RewriteRule ^source$ index.php?p=source-list [QSA,L]

RewriteRule ^source/([w-]{1,32})$ index.php?p=source&source=$1 [QSA,L]

# Datasets

RewriteRule ^data$ index.php?p=dataset-list [QSA,L]

RewriteRule ^data/([w-]{1,32})$ index.php?p=dataset&dataset=$1 [QSA,L]

RewriteRule ^data/([w-]{1,32})/data(?:.(csv|json|xml|n3))?$ index.php?p=report&dataset=$1&format=$2 [QSA,L]

RewriteRule ^data/([w-]{1,32})/history$ index.php?p=dataset-history&dataset=$1 [QSA,L]

RewriteRule ^data/([w-]{1,32})/stats(?:.(csv|json))?$ index.php?p=stats&dataset=$1&format=$2 [QSA,L]

RewriteRule ^data/([w-]{1,32})/map(?:.(csv|json))?$ index.php?p=map&dataset=$1&format=$2 [QSA,L]

RewriteRule ^data/([w-]{1,32})/(stats|data|map)/filter/([w]{1,32})$ index.php?p=filter&dataset=$1&type=$2&filter_tag=$3 [QSA,L]

# Imports

RewriteRule ^data/([w-]{1,32})/([d:.+-]+)$ index.php?p=dataset&dataset=$1&import=$2 [QSA,L]

RewriteRule ^data/([w-]{1,32})/([d:.+-]+)/data(?:.(csv|json|xml|n3))?$ index.php?p=report&dataset=$1&import=$2&format=$3 [QSA,L]

RewriteRule ^data/([w-]{1,32})/([d:.+-]+)/stats(?:.(csv|json))?$ index.php?p=stats&dataset=$1&import=$2&format=$3 [QSA,L]

# Tags

RewriteRule ^tag$ index.php?p=tag-list [QSA,L]

RewriteRule ^tag/([w]{1,32})$ index.php?p=tag&tag=$1 [QSA,L]

# Users

RewriteRule ^user$ index.php?p=user-list [QSA,L]

RewriteRule ^user/([w-]{1,32})$ index.php?p=user&user=$1 [QSA,L]

</ifmodule>

On Github License

Files

Download PDF of Htaccess file

Comments

Apache