Answer the question
In order to leave comments, you need to log in
How to redirect all requests to another site in apache?
Hello dear.
There is a domain name site.ru, all requests are needed, such as
site.ru
site.ru/sdfgdfg
site.ru/1/1/1
, etc. redirect to the VKontakte group vk.com/group .
I did Redirect permanent / vk.com/group/
in the Apache site config,
but this redirects the site.ru/1/1/1 request to vk.com/group/1/1/1 and VKontakte, respectively, responds with a 404th.
As I understand it, it is more competent to do this with a 301st redirect to mod_rewrite, but then what should the RewriteRule line look like correctly?
Answer the question
In order to leave comments, you need to log in
RewriteEngine on
RewriteBase /
RewriteRule ^(.*) http://vk.com/group/ [R=301,L]
look like this
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question