Simple redirect that is not working.... :(
Posted: Wed Jul 02, 2008 10:55 pm
I am new to PHP code (just starting a website), however I have wrote generic object oriented code before which is similar. I wrote a simple redirect code to redirect my main site http://www.StreetLegalTech.com to a sub directory http://www.StreetLegalTech.com/LTXLSX , I have to have this redirect until I get my main page up and running (which will be awhile) anyways my code is pasted below, but when i pull the page up it gives me the following error :
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in D:\Hosting\3074294\html\default.php on line 2
Parse error: syntax error, unexpected T_STRING in D:\Hosting\3074294\html\default.php on line 2
I have thought about this for hours and can't come up with any thing wrong with this code, if anyone can help I would greatly appreciate it.
Thanks,
Code saved as default.php, also have tried saving it as index.php:
<?php
header("http/1.1 301 Moved Permanently");
header("location: http://www.streetlegaltech.com/ltxlsx/");
exit();
?>
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in D:\Hosting\3074294\html\default.php on line 2
Parse error: syntax error, unexpected T_STRING in D:\Hosting\3074294\html\default.php on line 2
I have thought about this for hours and can't come up with any thing wrong with this code, if anyone can help I would greatly appreciate it.
Thanks,
Code saved as default.php, also have tried saving it as index.php:
<?php
header("http/1.1 301 Moved Permanently");
header("location: http://www.streetlegaltech.com/ltxlsx/");
exit();
?>