julien-boudry/Condorcet.Vote/master/.htaccess - Htaccess File

julien-boudry/Condorcet.Vote/master/.htaccess

# Directory
Options -Indexes

# Filter
<FilesMatch "(?<!index).php?$"> 
  Order Deny,Allow 
  Deny from all
</FilesMatch>

# Rewrite
Options +FollowSymlinks
RewriteEngine On

# Edit corrects
  RewriteRule ^Vote/([a-zA-Z0-9]+)/Admin/([a-zA-Z0-9]+) index.php?route=Admin&vote=$1&admin_code=$2 [L] 

# Add corrects

  # Public
  RewriteRule ^Vote/([a-zA-Z0-9]+)/Public/([a-zA-Z0-9]+) index.php?route=Add&vote=$1&mode=Public&free_vote_code=$2 [L] 

  # Personnal
  RewriteRule ^Vote/([a-zA-Z0-9]+)/Personnal/([a-zA-Z0-9]+)/([a-zA-Z0-9]+) index.php?route=Add&vote=$1&mode=Personnal&personnal_name=$2&personnal_code=$3 [L]

# Vote
  RewriteRule ^Vote/([a-zA-Z0-9]+) index.php?route=Vote&vote=$1 [L] 

# Routes simples
  RewriteRule ^([a-zA-Z_]+)(/)*$ index.php?route=$1 [L]

On Github License

Files

Download PDF of Htaccess file

Comments

Apache