Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/likejazz/mod-url-replace
Apache module for replacing OLD urls to NEW urls.
https://github.com/likejazz/mod-url-replace
Last synced: 7 days ago
JSON representation
Apache module for replacing OLD urls to NEW urls.
- Host: GitHub
- URL: https://github.com/likejazz/mod-url-replace
- Owner: likejazz
- Created: 2015-07-16T14:10:07.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-10T08:31:38.000Z (about 9 years ago)
- Last Synced: 2024-03-15T05:41:47.825Z (9 months ago)
- Language: C
- Homepage:
- Size: 141 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
mod_url_replace
================Replace OLD urls to NEW urls based on mod_substitute.c
```
LoadModule url_replace_module modules/mod_url_replace.so
......
# Replace OLD to NEW servers.
SetOutputFilter URL-REPLACE```
## DEMO
### Source
```
$ cat index.htmlhttps://t1.search.daumcdn.net/argon/0x200_85_hr/IHxzswBdipQ
https://t2.search.daumcdn.net/argon/0x200_85_hr/ClTWD6PQvux
https://t4.search.daumcdn.net/argon/0x200_85_hr/GWIqfBjaDrt
```### Service
```
$ 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/htmlhttps://t1.search.daumcdn.net/argon/0x200_85_hr/IHxzswBdipQ
https://t99.search.daumcdn.net/argon/0x200_85_hr/ClTWD6PQvux
https://t99.search.daumcdn.net/argon/0x200_85_hr/GWIqfBjaDrt
```It will convert OLD urls to NEW urls automatically. You don't have to do ANYTHING.
# Installation
Edit PATHs in `modules/url-replace/build.sh` before building.
```
$ sh build.sh
```You can see `mod_url_replace.so` in `modules` directory from build output.