Code

smart-http: Don't change POST to GET when following redirect
[git.git] / t / lib-httpd / apache.conf
index 4961505d1dd99da529b43abd42522e6a005961b1..f41c7c674c497825d714a0fe9be3c9bc0a0f30c6 100644 (file)
@@ -17,6 +17,9 @@ ErrorLog error.log
 <IfModule !mod_env.c>
        LoadModule env_module modules/mod_env.so
 </IfModule>
+<IfModule !mod_rewrite.c>
+       LoadModule rewrite_module modules/mod_rewrite.so
+</IFModule>
 
 Alias /dumb/ www/
 
@@ -36,6 +39,10 @@ ScriptAlias /smart_noexport/ ${GIT_EXEC_PATH}/git-http-backend/
        Options ExecCGI
 </Files>
 
+RewriteEngine on
+RewriteRule ^/smart-redir-perm/(.*)$ /smart/$1 [R=301]
+RewriteRule ^/smart-redir-temp/(.*)$ /smart/$1 [R=302]
+
 <IfDefine SSL>
 LoadModule ssl_module modules/mod_ssl.so