Answer the question
In order to leave comments, you need to log in
Forwarding to 1C bitrix?
Good afternoon!
Such a question on the site, which is made on 1C bitrix, there is a personal account of the buyer, how to make it redirect to the main page of the site when leaving the personal account (logout).
Now when you exit the personal account, it redirects to /personal/
Answer the question
In order to leave comments, you need to log in
Check if the user is authorized and redirect
global $USER;
if (!$USER->IsAuthorized()) LocalRedirect("/");
I used to do a redirect like this. I had a form that was submitted via POST.
<form action="/formdata.php" method="POST" enctype="multipart/form-data" name="form" id="form">
<input type="hidden" name="curAdres" value="<?='https://'.$_SERVER["HTTP_HOST"].$APPLICATION->GetCurPage()?>">
<input type="email" name="email" placeholder="E-mail куда отправить" value="" required>
<input class="submitbutton" name="" type="submit" value="Отправить">
</form>
value="<?='https://'.$_SERVER["HTTP_HOST"].$APPLICATION->GetCurPage('/')?>"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question