Permalink
Browse files

Merge pull request #13 from Polzme/htaccess-support

RewriteBase modification after make
  • Loading branch information...
2 parents 8e7325d + 7e4166b commit 1d0c91be850d0af24a742a6a4f9a20419deda5cf @kasperg kasperg committed Apr 19, 2012
Showing with 16 additions and 0 deletions.
  1. +3 −0 build.default.properties
  2. +13 −0 build.xml
View
@@ -22,6 +22,9 @@ drupal.db.url = sqlite:${project.drupal.dir}/database.sqlite
# drupal.make.nocore = 1
# The directory to make the site in relative to the project root directory
# drupal.make.dir = site
+# Should we update the RewriteBase directive in .htaccess ?
+# Ex: drupal.make.rewritebase = /drupal7
+# drupal.make.rewritebase =
# The directory containing the modules and themes for the project relative to the drupal root directory. If using Drush Make this is also where modules, themes, libraries etc. will be downloaded to.
project.code.dir = sites/all
View
@@ -969,6 +969,19 @@ called from `init` target. -->
</else>
</if>
+ <if>
+ <isset property="drupal.make.rewritebase">
+ <then>
+ <reflexive file="${project.drupal.dir}/.htaccess">
+ <filterchain>
+ <replaceregexp>
+ <regexp pattern="# RewriteBase [\w/]*" replace="RewriteBase ${drupal.make.rewritebase}"/>
+ </replaceregexp>
+ </filterchain>
+ </reflexive>
+ </then>
+ </if>
+
<!-- Set property to prevent target from being executed multiple times -->
<property name="project.make.skip" value="true"/>
</then>

0 comments on commit 1d0c91b

Please sign in to comment.