git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bd23290
)
rewrite extensionless script requests
author
Mischa POSLAWSKY
<perl@shiar.org>
Tue, 16 Sep 2008 02:49:48 +0000
(
02:49
+0000)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Tue, 16 Sep 2008 03:31:31 +0000
(
03:31
+0000)
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.
.htaccess
patch
|
blob
|
history
diff --git
a/.htaccess
b/.htaccess
index f8571b4d87da28b0cb23fafb5d78d37a3f52d5f4..f322d756e81f3e949d030d0a4ae6f3b5b8b96fb6 100644
(file)
--- a/
.htaccess
+++ b/
.htaccess
@@
-1
+1,9
@@
DirectoryIndex index.plp
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
+