2 # DirectoryIndex _NOTEXISTS
3 IndexOptions NameWidth=*
7 #<IfModule !mod_perl.c>
10 # For "*.shtml" as "./project/Islet/Islet/Islet.shtml" etc.
12 # Prevent: Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden
13 Options +SymLinksIfOwnerMatch
17 #<IfModule mod_expires.c>
19 # ExpiresDefault "access plus 1 hours"
22 AddHandler server-parsed .shtml
23 AddHandler cgi-script .cgi
25 AddType "text/html; charset=us-ascii" .html
26 AddType "text/html; charset=us-ascii" .shtml
27 AddType "text/plain; charset=us-ascii" .txt
28 AddType "text/plain; charset=us-ascii" .asc
29 AddType application/x-rpm .rpm
30 AddType application/x-nokia-9000-communicator-add-on-software .aos
31 AddType application/vnd.symbian.install .sis
32 AddType video/ogg .ogv
34 RemoveEncoding .gz .Z .bz .bz2 .zip
35 AddType application/x-gzip .gz
36 AddType application/x-compress .Z
37 AddType application/x-bzip .bz
38 AddType application/x-bzip2 .bz2
39 AddType application/zip .zip
40 AddType video/webm .webm
42 # Do not: text/javascript
43 # as it does not look as registered, at least according to: MIME::Types $VERSION 1.15
44 # "application/javascript" so far standardized till 2005-12-08 by:
45 # http://www.ietf.org/internet-drafts/draft-hoehrmann-script-types-03.txt
46 AddType application/javascript .js
49 php_flag short_open_tag off
50 php_flag magic_quotes_gpc off
51 php_flag magic_quotes_runtime off
54 <IfModule mod_rewrite.c>
55 # RewriteRule ^(mailman|pipermail)(|/.*)$ http://host1.jankratochvil.net/$1$2?${unescape:%{QUERY_STRING}} [P,L]
56 #RewriteRule ^priv/(photo)(|/.*)$ http://www.jankratochvil.net/$1$2?${unescape:%{QUERY_STRING}} [R=301,L]
57 RewriteRule ^(priv/)?photo(|/.*)$ http://gallery.jankratochvil.net/$2?${unescape:%{QUERY_STRING}} [R=301,L]
58 RewriteRule ^priv/evelina(|/.*)$ http://gallery.jankratochvil.net/evelina$2?${unescape:%{QUERY_STRING}} [R=301,L]
60 # as any non-1st brackets' contents would get ignored!
61 # Use always suffix: ?${unescape:%{QUERY_STRING}}
62 # as $QUERY_STRING gets otherwise double-escaped (or if "NE" the path gets unescaped).
63 # FIXME: Should be applied also for the "P" rules?
64 # WARNING: Requires server/virtualhost definition: RewriteMap unescape int:unescape
67 # http://www.askapache.com/htaccess/http-https-rewriterule-redirect.html
68 RewriteCond %{HTTPS} =on
69 RewriteRule ^(.*)$ - [env=ps:https]
70 RewriteCond %{HTTPS} !=on
71 RewriteRule ^(.*)$ - [env=ps:http]
73 # RewriteRule ^kocky(|/.*)$ http://kocky.vellum.cz/$1?${unescape:%{QUERY_STRING}} [R=301,L]
74 # RewriteRule ^(4cinfo|4c)(|/.*)$ http://4c.jankratochvil.net/$2?${unescape:%{QUERY_STRING}} [R=301,L]
75 # RewriteRule ^sw(|/.*)$ http://%{SERVER_NAME}/project$1?${unescape:%{QUERY_STRING}} [R=301,L]
76 # Referenced by resume/:
77 RewriteRule ^(project|product)s(|/.*)$ %{ENV:ps}://%{SERVER_NAME}/$1$2?${unescape:%{QUERY_STRING}} [R=301,L]
80 # RewriteRule ^(akra)(|/.*)$ http://www2.jankratochvil.net/$1$2?${unescape:%{QUERY_STRING}} [R=302,L]
81 # RewriteRule ^(akra2)(|/.*)$ http://vellum.cz/~akra$2?${unescape:%{QUERY_STRING}} [R=302,L]
82 #<IfModule !mod_perl.c>
84 # RewriteRule ^favicon[.]ico$ /My/Status.pm?code=404 [R=301,L]
85 RewriteRule ^favicon[.]ico$ /My/Status.pm?code=404 [P,L]
86 RewriteRule ^(.*)[.](html|txt)[.]pl(|/.*)$ /$1.pm$3?${unescape:%{QUERY_STRING}} [R=301,L]
87 RewriteRule ^resume/Resume-JanKratochvil.pm(|/.*)$ /resume/ResumeJanKratochvil.pm$1?${unescape:%{QUERY_STRING}} [R=301,L]
88 # RewriteRule ^(.*?)/+Index[.]pm$ /$1/?${unescape:%{QUERY_STRING}} [R=301,L]
89 RewriteCond %{REQUEST_FILENAME}/Index.pm -f
90 # It may be "" for the root directory:
91 # RewriteRule ^(|(.*?/)/*)$ /$2Index.pm [R=301,L]
92 # Do not /$2Index.pm due to: SSL Proxy requested for www.jankratochvil.net:443 but not enabled [Hint: SSLProxyEngine]
93 # Do not: http://www.jankratochvil.net/$2Index.pm as the My::Web redirects would not detect HTTPS.
94 RewriteRule ^(|(.*?/)/*)$ /$2Index.pm [P,L]
95 # RewriteRule ^(|(.*?/)/*)$ http://localhost:7680/$2Index.pm [P,L]
96 # RewriteRule ^(.*[.]pm(|/.*))$ http://localhost:7680/$1 [P,L]
97 #RewriteCond %{REQUEST_URI} !^/*(thelaytons)(|/.*)$
98 #RewriteRule ^/*(thelaytons)(|/.*)$ /${tolower:$1}$2 [NC,L,R=301]
101 RewriteRule ^/*cam$ http://host2/cgi-bin/motion-jpeg.cgi [P,L]
102 RewriteRule ^/*campng$ http://host2/cgi-bin/motion-png.cgi [P,L]
103 RewriteRule ^/*superb/*$ http://gallery.jankratochvil.net/z2015-11-23-superb-crash/x/ [R=301,L]