G
G
Good Samaritan2019-05-09 17:37:23
htaccess
Good Samaritan, 2019-05-09 17:37:23

How to redirect site.ru to site.ru/index.php?qa=questions?

Good afternoon. I have such a problem, when you open the site there is a list of articles, but there is no pagination at the bottom, but if you follow the link site.ru/index.php?qa=questions pagination appears. I wanted to fix the code, but cms is not familiar to me, I did not decide to bother. Actually the question is how to redirect when opening a site to the address index.php?qa=questions .
I tried to do it with php, so an endless redirect appeared.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Novak, 2019-05-09
@djamali

The infinite redirect happens because you don't check the current request address.
Check by type or$_SERVER['REQUEST_URI'] === "/"

if (!isset($_GET['qa'])) {
  //...
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question