Jump to content

Help with nginx rule


FD_F

Recommended Posts

Hi,

 

i have many sub domains i need to rewrite 

 

for example:

http://subx.domain.com/i30/index.html

will rewrite to:

/home/domain/live.domain.com/subx/i30/index.html

 

so i did rule:

if ( $host ~ "subx.domain.com" ) {

        rewrite ^(.*) http://live.domain.com/subx/$uri last;

 

    }

 

but i don't want make every time different rule and i need to create  one will take care all the sub domains with the same course

 

any ideas ?

 

thanks!

 

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/241652-help-with-nginx-rule/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.