⌈⌋ ⎇ branch:  freshcode


Artifact [471a8b4e99]

Artifact 471a8b4e99504b04ab21b6b4adfc8a2a0124f1df:

  • File .htaccess — part of check-in [2e1e35664b] at 2014-06-25 06:10:43 on branch trunk — Initial website implementation: project submit, index listing, projects/ page, and moderation flags. (user: mario size: 566)

# encoding: UTF-8
# api: apache
# title: RewriteRules
# description: Map paths onto dispatcher script
#
#


RewriteEngine On

# strip www. prefix
RewriteCond %{HTTP_HOST} ^ww+\.(\w+\.\w+)\.?$
RewriteCond %{REQUEST_METHOD} ^GET$
RewriteRule ^(.*)$ http://%1/$1 [R,QSA,L]

# pages
RewriteRule ^$ index.php?page=index [L,QSA]
RewriteRule ^(projects|submit|flag|tags|feed|links|admin)/?(\w+)?/?$ index.php?page=$1&name=$2 [L,QSA]

# deny direct invocations
RewriteRule ^^^freshcode\.db.*$$$ - [F]
RewriteRule ^\. - [F]
RewriteRule ^(?!index\.)\w+\.php($$$|/.*)$ - [F]