# Ngx\_http\_secure\_link\_module after ngx\_http\_rewrite\_module

**URL:** <https://www.ruby-forum.com/t/ngx-http-secure-link-module-after-ngx-http-rewrite-module/179084>\
**Category:** NGINX\
**Created:** [November 17, 2009, 11:21am UTC](https://www.ruby-forum.com/t/ngx-http-secure-link-module-after-ngx-http-rewrite-module/179084 "2009-11-17T11:21:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xufengnju](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/e68b1a/32.png) [@xufengnju](https://www.ruby-forum.com/u/xufengnju)\
**Post date:** [November 17, 2009, 11:21am UTC](https://www.ruby-forum.com/t/ngx-http-secure-link-module-after-ngx-http-rewrite-module/179084/1 "2009-11-17T11:21:17Z")

</div>

Hi,  
Can we make ngx\_http\_secure\_link\_module work after the url handled by  
ngx\_http\_rewrite\_module ?

For example:  
Original URL:  
[http://x.com/photo-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx](http://x.com/photo-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)(32 bits)-real.jpg  
I want after rewrite,it would become  
/photo/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(32 bits)/real.jpg where  
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(32 bits) is the md5 checksum of  
real.jpg mixed with my secret key.  
But it fails.  
I noticed,proxy modules works well after the uri rewritten by Rewrite  
Module.  
Can we make secure\_link work too?

Also,  
does ngx\_http\_request\_t \*r,r-\>unparsed\_uri.data changed after the mod  
rewrite?  
How can we get the uri rewritten by mod rewrite?

Thanks.  
2009-11-17

xufengnju

---

<div class="post-metadata">

**Author:** ![xufengnju](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/e68b1a/32.png) [@xufengnju](https://www.ruby-forum.com/u/xufengnju)\
**Post date:** [November 17, 2009, 11:25am UTC](https://www.ruby-forum.com/t/ngx-http-secure-link-module-after-ngx-http-rewrite-module/179084/2 "2009-11-17T11:25:58Z")

</div>

Does it mean that ngx\_http\_secure\_link\_module can only handle the `raw`  
uri that in the format of ‘GET /prefix/check-code/realfile’ ?

2009-11-17

xufengnju

å‘ä»¶äººï¼š xufengnju  
å‘é€æ—¶é—´ï¼š 2009-11-17 18:17:04  
æ”¶ä»¶äººï¼š nginx  
æŠ„é€ï¼š  
ä¸»é¢˜ï¼š ngx\_http\_secure\_link\_module after ngx\_http\_rewrite\_module

Hi,  
Can we make ngx\_http\_secure\_link\_module work after the url handled by  
ngx\_http\_rewrite\_module ?

For example:  
Original URL:  
[http://x.com/photo-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx](http://x.com/photo-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)(32 bits)-real.jpg  
I want after rewrite,it would become  
/photo/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(32 bits)/real.jpg where  
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(32 bits) is the md5 checksum of  
real.jpg mixed with my secret key.  
But it fails.  
I noticed,proxy modules works well after the uri rewritten by Rewrite  
Module.  
Can we make secure\_link work too?

Also,  
does ngx\_http\_request\_t \*r,r-\>unparsed\_uri.data changed after the mod  
rewrite?  
How can we get the uri rewritten by mod rewrite?

Thanks.  
2009-11-17

xufengnju
