I want http://blog.domain.com/ to point to http://www.domain.com/blog
Just a notice, not to redirect to that location, but just point to it.
Also /blog is not a folder. It could be blog.php for example
So when I navigate to http://blog.domain.com, the website display's content from http://www.domain.com/blog
What I tried so far:
server{
listen 80;
server_name blog.domain.com;
rewrite ^/blog(.*) http://blog.domain.com/$1 permanent;
}
The result is nginx returning 404 not found error.
No comments:
Post a Comment