重定向循环(仅在在线服务器上,但不在localhost上)

I made a site in php, sql, html and CSS. When I ran this site on my localhost everything worked perfectly fine. But when I uploaded it (and automatically added a .htaccess file) to an online server, it gave me a redirection loop error. The redirection structure of my page is the following:

index.php:

-form one with "button" tags (not input type: button) --> post method: page1.php

-form two with "button" tags (not input type: button) --> post method: page2.php

-form three with "button" tags (not input type: button) --> post method: page3.php

page1.php:

-php/sql processing (inserting variables in database, calculating them, ...)

-header(location: index.php)(that is automatically executed after the other php code)

page2.php:

-php/sql processing (inserting variables in database, calculating them, ...)

-header(location: index.php)(that is automatically executed after the other php code)

page3.php:

-instant run of a header(location: index.php);

to reload the page

All help is appreciated,

Bibbox3