From: x2002bobillot Date: Sun, 21 Jan 2007 12:37:21 +0000 (+0000) Subject: Gestion plus propre du htdocs/.htaccess X-Git-Tag: xorg/0.9.13~97 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=b6cdf7b450a26a7fb5027d23569b15def0abd812;p=platal.git Gestion plus propre du htdocs/.htaccess git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1374 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/Makefile b/Makefile index 6f777a1..230f576 100644 --- 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 diff --git a/htdocs/.htaccess b/htdocs/.htaccess.in similarity index 87% rename from htdocs/.htaccess rename to htdocs/.htaccess.in index 3753de7..464189b 100644 --- a/htdocs/.htaccess +++ b/htdocs/.htaccess.in @@ -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