【发布时间】:2013-07-10 22:19:58
【问题描述】:
刚刚在我的网站上安装了一个新主题:www.rivertam.co
出于某种原因,我一直在顶部收到此 403 Forbidden 错误。
我已尝试按照某些人的建议删除 htaccess 文件,但没有任何反应。真的不知道为什么会在那里。
谁能给我一些建议?
很高兴粘贴您可能需要的任何 PHP。请告诉我!
Header.php 代码:
<!DOCTYPE html>
> > > >
<title><?php wp_title( ' ', true, 'right' ); /* filtered in libraries/filers.php */ ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<link rel="shortcut icon" href="<?php echo get_template_directory_uri(); ?>/favicon.gif" />
<link rel="apple-touch-icon" href="<?php echo get_template_directory_uri(); ?>/apple-touch-icon.png" />
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<![endif]-->
<?php
// See functions.php for CSS / JAVASCRIPT information
wp_head(); // do not remove this
?>
>
<div id="branding_wrap">
<header id="branding">
<div class="container">
<?php
// Grab the column settings from theme settings to determine the logo/menu container sizes
$logo_columns = $menu_columns = "eight";
$header_layout = cudazi_get_option( 'header_layout', 'eight|eight' );
$header_layout = explode('|', $header_layout);
if ( is_array( $header_layout ) ) {
$logo_columns = $header_layout[0];
$menu_columns = $header_layout[1];
}
?>
<hgroup class="<?php echo $logo_columns; ?> columns">
<h1 id="logo"><?php echo cudazi_get_logo(); ?></h1>
<?php if ( ! cudazi_get_option( 'disable_tagline', false ) ) { ?>
<h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>
<?php } ?>
</hgroup>
<nav class="<?php echo $menu_columns; ?> columns" id="navigation" role="navigation">
<?php wp_nav_menu( array( 'menu_class' => 'sf-menu clearfix', 'theme_location' => 'primary', 'fallback_cb' => 'cudazi_menu_fallback' ) ); ?>
<?php echo cudazi_alternate_menu( array( 'menu_name' => 'primary', 'display' => 'select' ) ); ?>
</nav>
</div><!--//container (skeleton) -->
</header><!--//header-->
</div>
<section id="main">
【问题讨论】:
-
在您的主题中搜索
403 Forbidden,因为除了该文本之外,该网站似乎运行良好。 -
某事导致服务器的 403 禁止页面代码被注入到您的标头末尾(就在关闭
</head>标记之前),即使该站点是可访问的。您可以发布您主题的header.php文件的代码吗?我从未见过这种事情发生,但可能是标头中调用的某些资源导致了这种情况。 -
另外,您是否尝试过禁用插件以查看其中一个是否负责?
-
嘿,Ennui,我尽我所能在顶部添加了代码!
-
我禁用了所有插件。没有帮助 =[
标签: html wordpress themes http-status-code-403