X-Git-Url: http://git.jankratochvil.net/?p=www.jankratochvil.net.git;a=blobdiff_plain;f=.htaccess;h=97a08e371ff0631097424a3c6a88bee8ce891b5d;hp=8d6152c561197a5eb3b7ad247d0885082faa3f7d;hb=9b9da21fd793a407d9339333ff6a1c9b3cddf1e4;hpb=f582fb27d93e76dd277566b8af998114b5c750c8
diff --git a/.htaccess b/.htaccess
index 8d6152c..97a08e3 100644
--- a/.htaccess
+++ b/.htaccess
@@ -1,44 +1,68 @@
-DirectoryIndex index.html
+
+ DirectoryIndex _NOTEXISTS
+ IndexOptions NameWidth=*
+
-AddType text/html .shtml
-AddHandler server-parsed .shtml
-AddType "text/html; charset=iso-8859-2" .html
-AddType "text/html; charset=iso-8859-2" .shtml
-AddType "text/plain; charset=iso-8859-2" .txt
-AddType "text/plain; charset=iso-8859-2" .asc
-Options Indexes Includes FollowSymLinks
-
- RemoveEncoding .gz .Z .bz .bz2 .zip
- AddType application/x-gzip .gz
- AddType application/x-compress .Z
- AddType application/x-bzip .bz
- AddType application/x-bzip2 .bz2
- AddType application/zip .zip
-
+Options None
+
+ Options +Indexes
+ # For "*.shtml" as "./project/Islet/Islet/Islet.shtml" etc.
+ Options +Includes
+ # Prevent: Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden
+ Options +SymLinksIfOwnerMatch
+
+AddHandler server-parsed .shtml
AddHandler cgi-script .cgi
-IndexOptions NameWidth=*
+
+AddType "text/html; charset=us-ascii" .html
+AddType "text/html; charset=us-ascii" .shtml
+AddType "text/plain; charset=us-ascii" .txt
+AddType "text/plain; charset=us-ascii" .asc
AddType application/x-rpm .rpm
AddType application/x-nokia-9000-communicator-add-on-software .aos
-php_flag short_open_tag off
-php_flag magic_quotes_gpc off
-php_flag magic_quotes_runtime off
+AddType application/vnd.symbian.install .sis
-
- RewriteEngine on
- RewriteRule ^(/home/short/www/www.jankratochvil.net/)?kocky/*(.*)$ http://kocky.vellum.cz/$2 [R=301] [L]
-
-
- RewriteEngine on
- RewriteRule ^(/home/short/www/www.jankratochvil.net/)?4c/*(.*)$ http://4c.jankratochvil.net/$2 [R=301] [L]
-
-
- RewriteEngine on
- # $1 $2$3 $4
- RewriteRule ^(/home/short/www/www.jankratochvil.net/)?cgi/viewcvs(/(.*))?([?].*)?$ http://cvs.jankratochvil.net/viewcvs/$3$4 [R=301] [L]
- RewriteRule ^(/home/short/www/www.jankratochvil.net/)?cgi/*(.*)$ http://www.jankratochvil.net/cgi-bin/$2 [R=301] [L]
-
-
+RemoveEncoding .gz .Z .bz .bz2 .zip
+AddType application/x-gzip .gz
+AddType application/x-compress .Z
+AddType application/x-bzip .bz
+AddType application/x-bzip2 .bz2
+AddType application/zip .zip
+
+# Do not: text/javascript
+# as it does not look as registered, at least according to: MIME::Types $VERSION 1.15
+# "application/javascript" so far standardized till 2005-12-08 by:
+# http://www.ietf.org/internet-drafts/draft-hoehrmann-script-types-03.txt
+AddType application/javascript .js
+
+
+ php_flag short_open_tag off
+ php_flag magic_quotes_gpc off
+ php_flag magic_quotes_runtime off
+
+
+
+ # Do not: [R=301] [L]
+ # as any non-1st brackets' contents would get ignored!
+ # Use always suffix: ?${unescape:%{QUERY_STRING}}
+ # as $QUERY_STRING gets otherwise double-escaped (or if "NE" the path gets unescaped).
+ # FIXME: Should be applied also for the "P" rules?
+ # WARNING: Requires server/virtualhost definition: RewriteMap unescape int:unescape
RewriteEngine on
- RewriteRule ^(/home/short/www/www.jankratochvil.net/)?sw/*(.*)$ http://www.jankratochvil.net/project/$2 [R=301] [L]
-
+ RewriteRule ^kocky(|/.*)$ http://kocky.vellum.cz/$1?${unescape:%{QUERY_STRING}} [R=301,L]
+ RewriteRule ^(4cinfo|4c)(|/.*)$ http://4c.jankratochvil.net/$2?${unescape:%{QUERY_STRING}} [R=301,L]
+ RewriteRule ^sw(|/.*)$ http://%{SERVER_NAME}/project$1?${unescape:%{QUERY_STRING}} [R=301,L]
+ RewriteRule ^(project|product)s(|/.*)$ http://%{SERVER_NAME}/$1$2?${unescape:%{QUERY_STRING}} [R=301,L]
+ RewriteRule ^(mailman|pipermail|phorum|akra)(|/.*)$ http://www2.jankratochvil.net/$1$2?${unescape:%{QUERY_STRING}} [R=302,L]
+
+ RewriteRule ^favicon[.]ico$ /My/Status.pm?code=404 [P,L]
+ RewriteRule ^(.*)[.](html|txt)[.]pl(|/.*)$ /$1.pm$3?${unescape:%{QUERY_STRING}} [R=301,L]
+ RewriteRule ^resume/Resume-JanKratochvil.pm(|/.*)$ /resume/ResumeJanKratochvil.pm$1?${unescape:%{QUERY_STRING}} [R=301,L]
+ RewriteRule ^(.*?)/+Index[.]pm$ /$1/?${unescape:%{QUERY_STRING}} [R=301,L]
+ RewriteCond %{REQUEST_FILENAME}/Index.pm -f
+ # It may be "" for the root directory:
+ RewriteRule ^(|(.*?/)/*)$ http://localhost:7680/$2Index.pm [P,L]
+ RewriteRule ^(.*[.]pm(|/.*))$ http://localhost:7680/$1 [P,L]
+
+