rewrite n00b
Ryan B
mp3geek at gmail.com
Fri May 13 19:02:52 MSD 2011
Awesome thanks :)
I've got this, to redirect the requests, but If I request a file from
the orginal host, it won't redirect to the same file on the ip.
rewrite ^ http://113.214.191.192 permanent;
So http://domain.com/files.txt -> redirects to
http://113.214.191.192/files.txt (without the need to specifiy each
file name)
Thanks for the help
On Thu, May 12, 2011 at 5:20 PM, Igor Sysoev <igor at sysoev.ru> wrote:
> On Thu, May 12, 2011 at 02:13:03PM +1200, Ryan B wrote:
>> Hi,
>> Just wanting to enabled a rewrite of the following url,
>>
>> Redirecting all requests from http://www.domain.com/site/forums and
>> http://www.domain.com/forums to http://forums.domain.com
>
> server {
> server_name www.domain.com;
>
> location /forums {
> rewrite ^/forums(.*)$ http://forums.domain.com$1;
> }
>
> location /site/forums {
> rewrite ^/site/forums(.*)$ http://forums.domain.com$1;
> }
>
> ...
>
>
> --
> Igor Sysoev
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
>
More information about the nginx
mailing list