dou47278 2016-11-18 13:05
浏览 86
已采纳

PHP - 如果页面是index.php重定向到index.php?page = something

Is it possible to redirect index.php to index.php?page=something? Every attempt I've made so far causes a redirect loop.

  • 写回答

1条回答 默认 最新

  • douzachan4578 2016-11-18 13:07
    关注

    You could try this:

    index.php

    <?php
    if(!isset($_GET["page"])){
        header("Location: index.php?page=something");
        exit;
    }
    ?>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?