Php重定向搞砸了

Php重定向搞砸了,php,redirect,Php,Redirect,文件重定向到此文件,其中包含: <? 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/kin

文件重定向到此文件,其中包含:

<?
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;
}
?>

在html中表示感叹号。

由于这是重定向到kinder.php文件,因此这很可能是.htaccess文件的问题,导致所有URL重定向到kinder.php文件


查看.htaccess文件中是否有包含“kinder.php”的代码来查找问题。至于调整它,如果您能够发布.htaccess代码,我将非常乐意提供帮助。

此脚本不会向URL添加
%21
。检查是否有mod_rewrite或其他东西弄乱了URL,这完全超出了php的控制范围。
%21