页面显示 - 索引 - 而不是内容

时间:2014-12-14 22:06:42

标签: php html

我的网站运行得很好,但是很快我的支持页面停止了工作。每当我链接到它时,它会显示一个空白页面,其中包含文本index of /support,而不是应加载的内容。

我的index.php如下

<?php
    require_once ('inc/db/dbControl.php');
    require_once ('inc/db/functionControl.php');        
    include_once ("inc/page/header.php");
    include_once ("inc/elements/body.php");
    if (!empty($_GET['p'])){
        if($_GET['p'] == "admin"){
        }else{
            include_once ("inc/page/navigation.html");
        }
    }else{
        include_once ("inc/page/navigation.html");
    }
    include_once ("inc/page/pagepicker.php"); 
    if (!empty($_GET['p'])){
        if($_GET['p'] == "admin"){  
        }else{
            include_once ("inc/page/footer.html");
        }
    }else{
        include_once ("inc/page/footer.html");
    }
    include_once ("inc/elements/body_close.php");
    include_once ("inc/page/scripts.php");
?>

在我的index.php中是一个pagepicker,按照以下方式运行

if (!empty($_GET['p'])){
    $pages_dir = 'inc/content';
    $pages = scandir($pages_dir, 0);
    unset($pages[0], $pages[1]);

    $p = $_GET['p'];

    if(in_array($p.'.inc.php', $pages)){
        include($pages_dir.'/'.$p.'.inc.php');  
    }
    else
    {
            echo '<p>404 Page not found. Deze website is momenteel in aanbouw. Kom later nog eens terug of neem contact met ons op via <a href="mailto:info@jellyfishwebdesign.nl">info@jellyfishwebdesign.nl</a></p>';
    }
}else{
    include('inc/content/home.inc.php');
}

它适用于每个页面,但包含以下内容的支持页面除外。

<?php
    include_once ("inc/elements/support_front.html");
    include_once ("inc/elements/video.php");
    echo '<section class="content_web">';
        include_once  ("inc/elements/support_algemeen.html");
    echo '</section>';
?>  

由于没有名为support的文件夹(这是通过重写URL完成的),我不知道这里发生了什么。

htacces文件是这个

    Options +FollowSymLinks
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^([A-Za-z0-9-]+)$ index.php?p=$1 [L]
    RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$  index.php?p=$1&t=$2 [L]

对于在线示例,请点击the website并点击支持图标。我怎么解决这个问题?

修改

当我检查控制台时,它会尝试加载页面但在2个实例中。一旦作为水母网设计/支持,一次作为jellyfishwebdesign / support / ...最后一个是被接受的那个,另一个给我标题:

Remote Address: ------- blanked
Request URL:http://jellyfishwebdesign.nl/support
Request Method:GET
Status Code:301 Moved Permanently (from cache)
Request Headers
Provisional headers are shown
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Referer:http://jellyfishwebdesign.nl/home
User-Agent:Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36
Response Headers
Content-Length:245
Content-Type:text/html; charset=iso-8859-1
Date:Sun, 14 Dec 2014 21:47:45 GMT
Location:http://jellyfishwebdesign.nl/support/
Server:Apache/2.2.27 (Unix) mod_ssl/2.2.27 OpenSSL/1.0.1e-fips mod_bwlimited/1.4

0 个答案:

没有答案
相关问题