Answer the question
In order to leave comments, you need to log in
How to make a redirect from one domain to a page of another domain?
Hello everyone, I need help!!!
Now: when a guest enters the site.ru site, selects the functionality (in the form) clicks the next button,
the registration form drops out (on the main one) fills in the name, mail, and password. then click the register button.
and here the guest is redirected to the URL: site.ru/user/firstlogin
Purpose: after pressing the registration button, on the main site.ru domain, you need to redirect to another domain: site 2 .ru/user/firstlogin
The registration button has the following code:
<a href="index.html#" class="belize-hole-flat-button btn-register"><?php echo $this->lang->line('register_btn'); ?></a>
Answer the question
In order to leave comments, you need to log in
RewriteEngine on
#Включает редиректы
RewriteCond %{HTTP_HOST} ^!site2\.ru$ [NC]
#Если хост не содержит сайт 2 ( для отключения цикличности)
RewriteCond %{REQUEST_URI} ^user/firstlogin$
#Если содержит урл ( тут подправь что тебе точно нужно, регулярку если потребуется)
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
#перенаправить все что есть на новый домен с сохранением урла ( без гет запросов, про них ничего не спрашивал)
this is how you do it after pressing the redirect(domain); to the address you need, hosting.
why do it through htaccess at all?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question