[英]Php Redirecting is messed up
文件重定向到該文件,其中包含:
<?
if(!session_id()) {
session_start();
if (strlen($_SESSION['login']) < 1)
die("you're not logged in!");
}
$changer = $_POST['form1'];
switch($changer) {
case 'write':
header("Location: http://teachertechtutor.com/php/learn/kinder/write.php");
break;
case 'read':
header("Location: http://teachertechtutor.com/php/learn/kinder/read.php");
break;
case 'math':
header("Location: http://teachertechtutor.com/php/learn/kinder/math.php");
break;
}
?>
但是當這個重定向時,它增加了一個類似數學的奇怪的東西: http : //teachertechtutor.com/redirects/kinder.php? math= Math%21
為什么要添加整個重定向內容...? redirects / kinder.php?math = Math%21應該是php / learn / kinder / math.php
%21
代表html中的感嘆號。 URL編碼功能
由於這是重定向到kinder.php文件,因此.htaccess文件很有可能會導致所有URL都重定向到kinder.php文件。
在您的.htaccess文件中查找包含“ kinder.php”的所有代碼,以查找問題所在。 至於調整它,如果您能夠發布.htaccess代碼,我將非常樂意為您提供幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.