summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-11-07 22:08:03 +0100
committeremkael <emkael@tlen.pl>2018-11-07 23:03:32 +0100
commit5f655f3b9fff2f41754b9612ce178b495910f4d4 (patch)
treed0e5371d8b7e8a11b03953325bf98005c3fe824b
parentf5998c8bad50636ce95567eec4f9f3b837c017cc (diff)
Moving app to separate directory, scanning for PBN files in a separate directory
Fixes #2
-rw-r--r--.htaccess11
-rw-r--r--tdd/.htaccess16
-rw-r--r--tdd/tdd-bootstrap.php (renamed from tdd-bootstrap.php)2
-rw-r--r--tdd/tdd-handrecord-tpl.php (renamed from tdd-handrecord-tpl.php)0
-rw-r--r--tdd/tdd-protocol.php (renamed from tdd-protocol.php)0
-rw-r--r--tdd/tdd-simple-html-dom.php (renamed from tdd-simple-html-dom.php)0
6 files changed, 18 insertions, 11 deletions
diff --git a/.htaccess b/.htaccess
index a2a032f..d543787 100644
--- a/.htaccess
+++ b/.htaccess
@@ -1,11 +1,2 @@
-<Files ~ "\.(pbn)$">
- Order allow,deny
- Deny from all
-</Files>
-<Files ~ "\.(PBN)$">
- Order allow,deny
- Deny from all
-</Files>
-
RewriteEngine On
-RewriteRule ([a-zA-Z0-9-_]+)(\d)b-(\d+)\.html$ tdd-protocol.php?prefix=$1&round=$2&board=$3
+RewriteRule ([a-zA-Z0-9-_]+)(\d)b-(\d+)\.html$ tdd/tdd-protocol.php?prefix=$1&round=$2&board=$3
diff --git a/tdd/.htaccess b/tdd/.htaccess
new file mode 100644
index 0000000..fad82c6
--- /dev/null
+++ b/tdd/.htaccess
@@ -0,0 +1,16 @@
+<Files tdd-protocol.php>
+ <IfModule !mod_authz_core.c> # Apache 2.2
+ Order allow,deny
+ Allow from all
+ </IfModule>
+ <IfModule mod_authz_core.c> # Apache 2.4
+ Require all granted
+ </IfModule>
+</Files>
+<IfModule !mod_authz_core.c> # Apache 2.2
+ Order allow,deny
+ Deny from all
+</IfModule>
+<IfModule mod_authz_core.c> # Apache 2.4
+ Require all denied
+</IfModule>
diff --git a/tdd-bootstrap.php b/tdd/tdd-bootstrap.php
index bdd68b6..f22cd8e 100644
--- a/tdd-bootstrap.php
+++ b/tdd/tdd-bootstrap.php
@@ -15,7 +15,7 @@ class Protocol {
}
function get_filename() {
- return $this->prefix . $this->round . 'b-' . $this->board . '.html';
+ return '..' . DIRECTORY_SEPARATOR . $this->prefix . $this->round . 'b-' . $this->board . '.html';
}
function set_deal($table, $deal) {
diff --git a/tdd-handrecord-tpl.php b/tdd/tdd-handrecord-tpl.php
index 65836cf..65836cf 100644
--- a/tdd-handrecord-tpl.php
+++ b/tdd/tdd-handrecord-tpl.php
diff --git a/tdd-protocol.php b/tdd/tdd-protocol.php
index 3dcc0d8..3dcc0d8 100644
--- a/tdd-protocol.php
+++ b/tdd/tdd-protocol.php
diff --git a/tdd-simple-html-dom.php b/tdd/tdd-simple-html-dom.php
index b3b9ddd..b3b9ddd 100644
--- a/tdd-simple-html-dom.php
+++ b/tdd/tdd-simple-html-dom.php