|
@@ -0,0 +1,49 @@
|
|
1
|
+# Example rewrite rules for pna-based site
|
|
2
|
+# These should work in apache conf, or in .htaccess file.
|
|
3
|
+# I run these from apache conf
|
|
4
|
+
|
|
5
|
+# Allow rewrites
|
|
6
|
+RewriteEngine On
|
|
7
|
+
|
|
8
|
+# If accessing the index file from TUT rewrite into /tty
|
|
9
|
+RewriteCond %{REMOTE_ADDR} ^130\.230\.
|
|
10
|
+RewriteRule ^/$ /tty/ [R]
|
|
11
|
+RewriteRule ^/index.html$ /tty/ [R]
|
|
12
|
+
|
|
13
|
+# For each weekday, write into its specific page
|
|
14
|
+RewriteCond %{TIME_WDAY} 1
|
|
15
|
+RewriteRule ^/index.*$ /1.html
|
|
16
|
+RewriteCond %{TIME_WDAY} 1
|
|
17
|
+RewriteRule ^/(.*)/index.*$ /$1/1.html
|
|
18
|
+
|
|
19
|
+RewriteCond %{TIME_WDAY} 2
|
|
20
|
+RewriteRule ^/index.*$ /2.html
|
|
21
|
+RewriteCond %{TIME_WDAY} 2
|
|
22
|
+RewriteRule ^/(.*)/index.*$ /$1/2.html
|
|
23
|
+
|
|
24
|
+RewriteCond %{TIME_WDAY} 3
|
|
25
|
+RewriteRule ^/index.*$ /3.html
|
|
26
|
+RewriteCond %{TIME_WDAY} 3
|
|
27
|
+RewriteRule ^/(.*)/index.*$ /$1/3.html
|
|
28
|
+
|
|
29
|
+RewriteCond %{TIME_WDAY} 4
|
|
30
|
+RewriteRule ^/index.*$ /4.html
|
|
31
|
+RewriteCond %{TIME_WDAY} 4
|
|
32
|
+RewriteRule ^/(.*)/index.*$ /$1/4.html
|
|
33
|
+
|
|
34
|
+RewriteCond %{TIME_WDAY} 5
|
|
35
|
+RewriteRule ^/index.*$ /5.html
|
|
36
|
+RewriteCond %{TIME_WDAY} 5
|
|
37
|
+RewriteRule ^/(.*)/index.*$ /$1/5.html
|
|
38
|
+
|
|
39
|
+RewriteCond %{TIME_WDAY} 6
|
|
40
|
+RewriteRule ^/index.*$ /6.html
|
|
41
|
+RewriteCond %{TIME_WDAY} 6
|
|
42
|
+RewriteRule ^/(.*)/index.*$ /$1/6.html
|
|
43
|
+
|
|
44
|
+# For sunday, display monday which will display
|
|
45
|
+# the food of next monday for most restaurants
|
|
46
|
+RewriteCond %{TIME_WDAY} 0
|
|
47
|
+RewriteRule ^/index.*$ /1.html
|
|
48
|
+RewriteCond %{TIME_WDAY} 0
|
|
49
|
+RewriteRule ^/(.*)/index.*$ /$1/1.html
|