X-Git-Url: http://git.jankratochvil.net/?p=www.jankratochvil.net.git;a=blobdiff_plain;f=.htaccess;h=1a88392c2322dc30061d3a0063b56fa9ff05bc94;hp=86752db304618670bad46ad36b0cf673db90f447;hb=24a8daf8b7d70742e17efb0480135c28c71ab645;hpb=f98ea21c89225b70d0feea8e74d7315654feab42
diff --git a/.htaccess b/.htaccess
index 86752db..1a88392 100644
--- a/.htaccess
+++ b/.htaccess
@@ -1,16 +1,23 @@
- DirectoryIndex _NOTEXISTS
+# DirectoryIndex _NOTEXISTS
IndexOptions NameWidth=*
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
-
+#
+#
+
+#
+# ExpiresActive On
+# ExpiresDefault "access plus 1 hours"
+#
AddHandler server-parsed .shtml
AddHandler cgi-script .cgi
@@ -22,6 +29,7 @@ AddType "text/plain; charset=us-ascii" .asc
AddType application/x-rpm .rpm
AddType application/x-nokia-9000-communicator-add-on-software .aos
AddType application/vnd.symbian.install .sis
+AddType video/ogg .ogv
RemoveEncoding .gz .Z .bz .bz2 .zip
AddType application/x-gzip .gz
@@ -29,6 +37,7 @@ AddType application/x-compress .Z
AddType application/x-bzip .bz
AddType application/x-bzip2 .bz2
AddType application/zip .zip
+AddType video/webm .webm
# Do not: text/javascript
# as it does not look as registered, at least according to: MIME::Types $VERSION 1.15
@@ -43,6 +52,10 @@ AddType application/javascript .js
+# RewriteRule ^(mailman|pipermail)(|/.*)$ http://host1.jankratochvil.net/$1$2?${unescape:%{QUERY_STRING}} [P,L]
+ #RewriteRule ^priv/(photo)(|/.*)$ http://www.jankratochvil.net/$1$2?${unescape:%{QUERY_STRING}} [R=301,L]
+ RewriteRule ^(priv/)?photo(|/.*)$ http://gallery.jankratochvil.net/$2?${unescape:%{QUERY_STRING}} [R=301,L]
+ RewriteRule ^priv/evelina(|/.*)$ http://gallery.jankratochvil.net/evelina$2?${unescape:%{QUERY_STRING}} [R=301,L]
# Do not: [R=301] [L]
# as any non-1st brackets' contents would get ignored!
# Use always suffix: ?${unescape:%{QUERY_STRING}}
@@ -50,19 +63,42 @@ AddType application/javascript .js
# FIXME: Should be applied also for the "P" rules?
# WARNING: Requires server/virtualhost definition: RewriteMap unescape int:unescape
RewriteEngine on
- 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 ^projects(|/.*)$ http://%{SERVER_NAME}/project$1?${unescape:%{QUERY_STRING}} [R=301,L]
- RewriteRule ^(mailman|pipermail|priv|phorum|akra|project/captive/dist)(|/.*)$ http://www2.jankratochvil.net/$1$2?${unescape:%{QUERY_STRING}} [R=302,L]
-
+
+ # http://www.askapache.com/htaccess/http-https-rewriterule-redirect.html
+ RewriteCond %{HTTPS} =on
+ RewriteRule ^(.*)$ - [env=ps:https]
+ RewriteCond %{HTTPS} !=on
+ RewriteRule ^(.*)$ - [env=ps:http]
+
+# 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]
+ # Referenced by resume/:
+ RewriteRule ^(project|product)s(|/.*)$ %{ENV:ps}://%{SERVER_NAME}/$1$2?${unescape:%{QUERY_STRING}} [R=301,L]
+ # |phorum
+ # mailman|pipermail
+# RewriteRule ^(akra)(|/.*)$ http://www2.jankratochvil.net/$1$2?${unescape:%{QUERY_STRING}} [R=302,L]
+# RewriteRule ^(akra2)(|/.*)$ http://vellum.cz/~akra$2?${unescape:%{QUERY_STRING}} [R=302,L]
+ #
+#
+# RewriteRule ^favicon[.]ico$ /My/Status.pm?code=404 [R=301,L]
RewriteRule ^favicon[.]ico$ /My/Status.pm?code=404 [P,L]
- RewriteRule ^(.*)[.]html[.]pl(|/.*)$ /$1.pm$2?${unescape:%{QUERY_STRING}} [R=301,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]
+# 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]
-
+# RewriteRule ^(|(.*?/)/*)$ /$2Index.pm [R=301,L]
+ # Do not /$2Index.pm due to: SSL Proxy requested for www.jankratochvil.net:443 but not enabled [Hint: SSLProxyEngine]
+ # Do not: http://www.jankratochvil.net/$2Index.pm as the My::Web redirects would not detect HTTPS.
+ RewriteRule ^(|(.*?/)/*)$ /$2Index.pm [P,L]
+# RewriteRule ^(|(.*?/)/*)$ http://localhost:7680/$2Index.pm [P,L]
+# RewriteRule ^(.*[.]pm(|/.*))$ http://localhost:7680/$1 [P,L]
+#RewriteCond %{REQUEST_URI} !^/*(thelaytons)(|/.*)$
+#RewriteRule ^/*(thelaytons)(|/.*)$ /${tolower:$1}$2 [NC,L,R=301]
+ #
+#
+ RewriteRule ^/*cam$ http://host2/cgi-bin/motion-jpeg.cgi [P,L]
+ RewriteRule ^/*campng$ http://host2/cgi-bin/motion-png.cgi [P,L]
+ RewriteRule ^/*superb/*$ http://gallery.jankratochvil.net/z2015-11-23-superb-crash/x/ [R=301,L]