From: Mischa POSLAWSKY Date: Tue, 16 Sep 2008 02:49:48 +0000 (+0000) Subject: rewrite extensionless script requests X-Git-Tag: v1.2~57 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/5f6be2729161503016864b7c9c8d3a89dba31bf4 rewrite extensionless script requests Apache rewrite rule to redirect /script to *.plp if it exists, so that digraphs.plp (and other files in the future) can be found at just /digraphs. Nobody cares (or should care) about server side file type. --- diff --git a/.htaccess b/.htaccess index f8571b4..f322d75 100644 --- a/.htaccess +++ b/.htaccess @@ -1 +1,9 @@ DirectoryIndex index.plp + +RewriteEngine on +RewriteBase / + +# add .plp if a file exists with .plp appended (topdir only) +RewriteCond %{REQUEST_FILENAME}.plp -f +RewriteRule ^/*([^/]+)(.*) $1.plp$2 +