I need a nginx rewrite rule to rewrite from:
http://some-keyword.example.com
to www.example.com/keyword.php?keyword=$some-keyword
while domain without www
in front still rewrites to www.example.com
and www
isn't taken as a keyword.
Please could you help me to solve this problem, how to write these two rules?
If you meant redirect, then:
In the case of rewrite then simply do
If it's possible I'd only create 1 server(virtual host) which is the normal
domain.com
/www.domain.com
and then use the conf to rewrite the rest to themplease tell me if I missed something.