Answer the question
In order to leave comments, you need to log in
Is it possible to allow viewing only on Ajax page loading?
Let's say page 1 is blocked from viewing via a 301 redirect:
header('Location:/',TRUE,301);
exit();
Answer the question
In order to leave comments, you need to log in
Do like this:
<?php
// Если мы получили GET-запрос:
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
header('Location:/', TRUE, 301); // Переадресуем на главную
}
// Если мы получили POST-запрос:
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// Выводишь данные, которые нужны
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question