Commit 71f6177a0f63d23cfecc0f95ed1a800a40a3e973

Authored by Geoffrey PREUD'HOMME
1 parent 68620267

Removed hacky rewrite

Showing 3 changed files with 8 additions and 3 deletions   Show diff stats
.htaccess
... ... @@ -0,0 +1,2 @@
  1 +FallbackResource /index.php
  2 +ErrorDocument 404 /index.php
0 3 \ No newline at end of file
... ...
Makefile
... ... @@ -3,8 +3,6 @@ JQUERYVER=2.1.1
3 3 FONTS=robotech-gp.ttf robotaur.ttf
4 4  
5 5 BOOTSTRAPNEEDED=js/bootstrap.min.js css/bootstrap.min.css fonts/glyphicons-halflings-regular.*
6   -
7   -REDIRS=$(shell cd pages; echo *.php)
8 6 BOOTSTRAPNAME=bootstrap-$(BOOTSTRAPVER)-dist
9 7  
10 8 all: redirs $(BOOTSTRAPNEEDED) js/jquery.min.js $(addprefix fonts/,$(FONTS))
... ... @@ -38,4 +36,4 @@ fonts/robotaur.ttf:
38 36  
39 37 clean:
40 38 cd img; make clean
41   - rm -rf $(REDIRS) $(BOOTSTRAPNEEDED) $(addprefix fonts/,$(FONTS)) js/jquery.min.js
  39 + rm -rf $(BOOTSTRAPNEEDED) $(addprefix fonts/,$(FONTS)) js/jquery.min.js
... ...
index.php
... ... @@ -16,7 +16,12 @@ if ($page == '') {
16 16 $toLoad = "pages/$page.php";
17 17  
18 18 if (!file_exists($toLoad)) {
  19 + header('HTTP/1.1 404 Not Found');
  20 + header('Status: 404 Not Found'); // FastCGI fix
19 21 $toLoad = '404.php';
  22 +} else {
  23 + header('HTTP/1.1 200 OK');
  24 + header('Status: 200 OK'); // FastCGI fix
20 25 }
21 26  
22 27 if (isset($_GET['c'])) {
... ...