Answer the question
In order to leave comments, you need to log in
How to set up htaccess so that one page of the site opens on a sub-domain, and the rest on the domain?
Good afternoon.
There is a site on the symfony 3 framework.
Tell me what you need to write in htaccess (or somewhere else) so that one page of the site opens on a sub-domain, and the rest on the domain.
Example:
Answer the question
In order to leave comments, you need to log in
nginx:
server {
listen 80;
server_name news.site.ru;
...
}
server {
listen 80;
server_name site.ru news.site.ru;
...
location /news {
rewrite ^/news/(.*)$ http://news.site.ru/$1 permanent;
}
}
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} ^/news/.*$
RewriteRule ^/news/(.*)$ http://news.site.ru/$1 [R=301,L]
</IfModule>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question