DirectoryIndex page.shtml
e39m5 said:if someone types in www.1320info.com/asdlhglksgakjdhg.html i want it to go to www.1320info.com/index2.php
e39m5 said:heh, im a n00b at this, wheres the htaccess file?
deadserious said:You can add this to your .htaccess file:
ErrorDocument 404 http://www.yourdomain.ext/pageyouwantredirectedto.html
ErrorDocument 404 yourscript.php
<?php
header("HTTP/1.0 301 Moved");
header("Location: index2.php");
?>
Nice Tip!Michau said:Use:
Code:ErrorDocument 404 yourscript.php
And in yourscript.php:
Code:<?php header("HTTP/1.0 31 Moved"); header("Location: index2.php"); ?>
This way you will get indexed by sarch engines because the PHP script will remove the 404 error code.


