Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
F1r3Fl3x каза:Предполагам си направил нещо от рода на:
Просто остави в целият да има само header функцията и ще се оправи.Код:<?php echo 'Пренасочване'; header('Location: /home'); ?>
ПП. Трябва да имаш пуснат mod_rewrite и нстройки в .htaccess, за да стане работата с този /home![]()
RewriteEngine On
RewriteRule /index.php /home [R=301,QSA]
RewriteRule /home /home.php [L,QSA]
F1r3Fl3x каза:mod_rewrite би трябвало да ти е пуснат на хоста (ако си на платен, за безплатните не съм сигурен).
Сетих се, че може и без PHP да се направи това
Преименувай си индекс страницата на home.php
След това си създай един файл на име .htaccess в главната директория на сайта и сложи следното съдържание в него:
Код:RewriteEngine On RewriteRule /index.php /home [R=301,QSA] RewriteRule /home /home.php [L,QSA]
(Надявам се че rewrite-а беше така, защото не съм ползвал апаче от доста време)
qazxsw каза:Махни този .htaccess файл и в index.php файла който имаш истрий всичко и сложи този код:
Код:<?php header("HTTP/1.1 301 Moved Permanently"); header("Location: /home"); exit(); ?>
Karcho каза:Ем ние какво да направим като файла config.php не съществува :shock:
Karcho каза:Сложи в <head> и </head> <base href='http://site.com/'/> и си готов![]()
<?php
session_start();
require "config.php";
require "functions.php";
require "top.php";
?>
<?php
$queryString = strtolower($_SERVER['QUERY_STRING']);
if (strstr($queryString,"<") OR strstr($queryString,">") OR strstr($queryString,"(") OR strstr($queryString,")") OR
strstr($queryString,"..") OR
strstr($queryString,"%") OR
strstr($queryString,"*") OR
strstr($queryString,"+") OR
strstr($queryString,"!") OR
strstr($queryString,"@")) {
$loc = $_SERVER['PHP_SELF'];
$ip = $_SERVER['REMOTE_ADDR'];
$date = date ("d-m-Y @ h:i:s");
$lfh = "bann.txt";
$log = fopen ( $lfh,"a+" );
fputs ($log, "Attack Date: $date | Attacker IP: $ip | QueryString: $loc?=$queryString\n");
fclose($log);
echo "This attack has been logged!";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="menu.css" />
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<title>
<?php
$title[] = "dcT # GaminG";
$title[] = "dcT # GaminG :: BG";
$title[] = "Mess With The Best Die Like The Rest";
$title[] = "dcT # GaminG BG Community";
$rand = $title[array_rand($title)];
echo $rand;
?>
</title>
</head>
<base href='http://gam1ng-bg.info/'/>
<body>
<div id="wrap">
<div id="header">
<div id="banner">
<?php
define('IN_VALID', true);
include ("hiddenbyfeweR/inc/banners.php");
?>
</div>
</div>
<div id="nav">
<div class="left"></div>
<?php
define('IN_VALID', true);
include ("hiddenbyfeweR/inc/menu.php");
?>
<div class="right"></div>
</div>
<div id="main">
<div style="background-color:#ffffff;padding:10px;width:auto;border:1px solid #F7C275;text-align:center;margin:0 auto;font-weight:bold">
Добре дошли в сайта на difficult created Tactics.<br /> Тук ще намерите всичко за отбора. За да имате пълен достъп до сайта трябва да се регистрирате във форума.<br />
Надявам се сайта да ви харесва и да влизате често в него. <br /> Поздрави от екипа на dcT GaminG.
</div>
<div class="news">
<?php
define('IN_VALID', true);
include ("hiddenbyfeweR/inc/news.php");
?>
<div class="post">
<div class="bar"><div class="title"><h1><a href="index.php">dcT # GaminG Chat [GATHER IRC]</a></h1></div></div>
<div class="contt"></div>
<div class="cont">
<script src="chat.js"></script>
</div>
<div class="contb"></div>
</div>
</div>
<div class="center">
<div class="group latestmatches">
<?php if($user->data['is_registered']){
define ('IN_VALID', true);
include ('hiddenbyfeweR/inc/latest_matches.php');
}
else{
echo '<b>За да имате пълен достъп до сайта трябва да се <font color=red>регистрирате</font></b>';
}
?>
</div>
<div class="group partner">
<?php
define ('IN_VALID', true);
include ('hiddenbyfeweR/inc/partners.php');
?>
</div>
<div class="group poll">
<?php
define ('IN_VALID', true);
include ('hiddenbyfeweR/inc/poll.php');
?>
</div>
</div>
<div class="login">
<div class="type lead">
<center>
<?php
if($user->data['is_registered']){
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
echo get_user_avatar($user->data['user_avatar'], $user->data['user_avatar_type'], $user->data['user_avatar_width'], $user->data['user_avatar_height']);
echo '<a href="forum/ucp.php">Редактирай профил</a>';
}
else{
// ... потребителят не е логнат ...
}
if ($user->data['user_id'] == ANONYMOUS)
{
echo"
<form action="". append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login', true, $user->session_id) . "" method="post">
<input type="hidden" name="mode" value="login" />
Име: <br /><input type="text" name="username" /> <br />
Парола: <br /><input type="password" name="password" />
<input type="hidden" name="autologin" value="1" />
<br />
<input type="checkbox" class="radio" name="viewonline" /> Скрит
<br />
<input type="submit" value="Влез" name="login" />
<br />
<input type="hidden" name="redirect" value="index.$phpEx" />
</form>
<br />
";
}
else
{
echo"
<form action="". append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=logout', true, $user->session_id) . "" method="post">
<input type="hidden" name="mode" value="logout" />
Изход: <input type="submit" value="Излез" name="logout" />
</form>
";
}
if($user->data['is_registered']){
echo 'Надявам се сайта да ви харесва<br /> WebMaster <font color=red>feweR</font>';
}
else{
// ... потребителят не е логнат ...
}
?>
</center>
</div>
</div>
<div class="lgsl">
<div class="type lead">
<?php
global $lgsl_zone_number, $output;
$lgsl_zone_number = 1;
$output = "";
require "lgsl/lgsl_files/lgsl_zone.php";
echo $output;
?>
</div>
</div>
<div class="clear"></div>
</div>
<div id="footer">
<div class="left"></div>
<div class="bg">
<div class="copy">
<div align="center">
<?php
$ip="<font color=red>Your ip is</font>";
echo "$ip";
?>
<?php
function getip() {
$ip;
if (getenv("HTTP_CLIENT_IP")) $ip = getenv("HTTP_CLIENT_IP");
else if(getenv("HTTP_X_FORWARDED_FOR")) $ip = getenv("HTTP_X_FORWARDED_FOR");
else if(getenv("REMOTE_ADDR")) $ip = getenv("REMOTE_ADDR");
else $ip = "UNKNOWN";
return $ip;
}
echo getip();
?>
<?php
if($_SERVER['HTTP_ACCEPT_CHARSET'] != NULL && $_SERVER['HTTP_ACCEPT_ENCODING'] != NULL && $_SERVER['HTTP_CONNECTION'] != NULL)
{
echo "";
}
else
{
echo 'and <b>YOU</b> are fucking proxy and <b>YOUR REAL</b> IP is recorded in .txt file';
exit;
}
?>
</div>
Copyright ©2010 - All Rights Reserved<br />
Design by <a href="http://feweR.info">feweR</a> - coding by <a href="http://feweR.info">feweR</a> <br /> <script type="text/javascript">
d=document;
d.write('<a href="http://www.tyxo.bg/?101557" title="Tyxo.bg counter" target=" blank"><img width="88" height="31" border="0" alt="Tyxo.bg counter"');
d.write(' src="http://cnt.tyxo.bg/101557?rnd='+Math.round(Math.random()*2147483647));
d.write('&sp='+screen.width+'x'+screen.height+'&r='+escape(d.referrer)+'" /><\/a>');
//-->
</script>
<noscript><a href="http://www.tyxo.bg/?101557" title="Tyxo.bg counter" target=" blank"><img src="http://cnt.tyxo.bg/101557" width="88" height="31" border="0" alt="Tyxo.bg counter" /></a></noscript>
</div>
</div>
<div class="right"></div>
</div>
</div>
</body>
</html>
qazxsw каза:Ами излизат ти грешки защото имаш в index.php session_start();
Аз не мога да разбера този index.php трябва ли ти!?
Останах с впечатлението, че искаш да те пренасочва ама към този индекс файл или към друг.
Ако е към този индекс файл, но искаш той да се намира в директория /home направи 1 папка и я кръсти home там сложи този файл и след това направи нов index.php файл с кода който аз съм ти дал и го сложи в основната директория на сайта и ще ти стане.
И все още съм объркан какво точно искаш да направиш :shock:
Warning: require(config.php) [function.require]: failed to open stream: No such file or directory in /home/unrealga/public_html/gam1ng-bg.info/news/index.php on line 15
Warning: require(config.php) [function.require]: failed to open stream: No such file or directory in /home/unrealga/public_html/gam1ng-bg.info/news/index.php on line 15
Fatal error: require() [function.require]: Failed opening required 'config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/unrealga/public_html/gam1ng-bg.info/news/index.php on line 15
<?php
header("Location: /news");
exit();
?>
require("config.php");
require("../config.php");