Gestion plus propre du htdocs/.htaccess
authorx2002bobillot <x2002bobillot@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sun, 21 Jan 2007 12:37:21 +0000 (12:37 +0000)
committerx2002bobillot <x2002bobillot@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sun, 21 Jan 2007 12:37:21 +0000 (12:37 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1374 839d8a87-29fc-0310-9880-83ba4fa771e5

Makefile
htdocs/.htaccess.in [moved from htdocs/.htaccess with 87% similarity]

index 6f777a1..230f576 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,4 @@
+
 # $Id: Makefile,v 1.5 2004/11/25 20:18:39 x99laine Exp $
 ################################################################################
 # definitions
@@ -32,12 +33,16 @@ q:
 ## core
 ##
 
-core: spool/templates_c spool/mails_c include/globals.inc.php configs/platal.cron
+core: spool/templates_c spool/mails_c include/globals.inc.php configs/platal.cron htdocs/.htaccess
 
 spool/templates_c spool/mails_c spool/uploads:
        mkdir -p $@
        chmod o+w $@
 
+htdocs/.htaccess: htdocs/.htaccess.in Makefile
+       @REWRITE_BASE="/~$$(id -un)"; \
+       test "$$REWRITE_BASE" = "/~web" && REWRITE_BASE="/"; \
+       sed -e "s,@REWRITE_BASE@,$$REWRITE_BASE,g" $< > $@
 
 ##
 ## wiki
similarity index 87%
rename from htdocs/.htaccess
rename to htdocs/.htaccess.in
index 3753de7..464189b 100644 (file)
@@ -1,7 +1,7 @@
 Options +FollowSymLinks
 RewriteEngine on
 
-RewriteBase /~x2000habouzit
+RewriteBase @REWRITE_BASE@
 
 # Rewrite URLs of the form 'index.php?q=x':
 RewriteCond %{REQUEST_FILENAME} !-f