diff --git a/.config/apache-pretty-urls.config.php b/.config/apache-pretty-urls.config.php
new file mode 100644
index 0000000000000000000000000000000000000000..72da1d8c00cc3a6f5c1de3922ff955afd5f6333e
--- /dev/null
+++ b/.config/apache-pretty-urls.config.php
@@ -0,0 +1,4 @@
+<?php
+$CONFIG = array (
+  'htaccess.RewriteBase' => '/',
+);
diff --git a/11.0/apache/config/apache-pretty-urls.config.php b/11.0/apache/config/apache-pretty-urls.config.php
new file mode 100644
index 0000000000000000000000000000000000000000..72da1d8c00cc3a6f5c1de3922ff955afd5f6333e
--- /dev/null
+++ b/11.0/apache/config/apache-pretty-urls.config.php
@@ -0,0 +1,4 @@
+<?php
+$CONFIG = array (
+  'htaccess.RewriteBase' => '/',
+);
diff --git a/12.0/apache/config/apache-pretty-urls.config.php b/12.0/apache/config/apache-pretty-urls.config.php
new file mode 100644
index 0000000000000000000000000000000000000000..72da1d8c00cc3a6f5c1de3922ff955afd5f6333e
--- /dev/null
+++ b/12.0/apache/config/apache-pretty-urls.config.php
@@ -0,0 +1,4 @@
+<?php
+$CONFIG = array (
+  'htaccess.RewriteBase' => '/',
+);
diff --git a/update.sh b/update.sh
index ad6efc485a89c938d0d9b7cd8f6b5c4df9b55253..6ed577f185da40856f577d88dbad53928150409e 100755
--- a/update.sh
+++ b/update.sh
@@ -45,17 +45,18 @@ for latest in "${latests[@]}"; do
 				s/%%CMD%%/'"${cmd[$variant]}"'/g;
 			' "$version/$variant/Dockerfile"
 
-			# Remove Apache commands if we're not an Apache variant.
-			if [ "$variant" != "apache" ]; then
-				sed -ri -e '/a2enmod/d' "$version/$variant/Dockerfile"
-			fi
-
 			# Copy the docker-entrypoint.
 			cp docker-entrypoint.sh "$version/$variant/docker-entrypoint.sh"
 
 			# Copy the config directory
 			cp -rT .config "$version/$variant/config"
 
+			# Remove Apache commands and configs if we're not an Apache variant.
+			if [ "$variant" != "apache" ]; then
+				sed -ri -e '/a2enmod/d' "$version/$variant/Dockerfile"
+				rm "$version/$variant/config/apache-pretty-urls.config.php"
+			fi
+
 			for arch in i386 amd64; do
 				travisEnv='\n    - env: VERSION='"$version"' VARIANT='"$variant"' ARCH='"$arch$travisEnv"
 			done