Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
54 lines (42 sloc) 1.29 KB


Replace OLD urls to NEW urls based on mod_substitute.c

LoadModule url_replace_module modules/
<Directory "/Users/likejazz/workspace/github/httpd-build/htdocs">
    # Replace OLD to NEW servers.
    SetOutputFilter URL-REPLACE



$ cat index.html


$ echo "GET / HTTP/1.0\n" | nc localhost 8080
HTTP/1.1 200 OK
Date: Thu, 16 Jul 2015 11:29:06 GMT
Server: Apache/2.2.29 (Unix)
Last-Modified: Thu, 16 Jul 2015 09:22:27 GMT
ETag: "2057850-cf-51afa9c1f5ac0"
Accept-Ranges: bytes
Connection: close
Content-Type: text/html


It will convert OLD urls to NEW urls automatically. You don't have to do ANYTHING.


Edit PATHs in modules/url-replace/ before building.

$ sh

You can see in modules directory from build output.

You can’t perform that action at this time.