IIS does not use rewrite to implement static pages. read IIS does not use rewrite to implement static pages. the static pages that use rewrite do not actually exist, and iisewrite is unstable often 404, so I got this article. Principle: 404 use PHP (Asp can also be used) for page types, and combine with thieves to achieve static page use discuz! Forum archiver example ">
The static page with rewrite does not actually exist, and iisewrite is unstable and often 404, so this article is available.
Principle: 404 use PHP (Asp can also be used) for page types and combine with thieves to achieve static page
Use discuz! Example of forum archiver:
404 program page: http://bbs.pkxp.com/error.php
Demo: http://bbs.pkxp.com/archiver/
Error. php source code:
$ Url = $ _ SERVER ['query _ string'];
$ Url = str_replace ("404;", "", $ url );
If (! Ereg ('archiveer', $ url ))
Echo "Error 404 ";
// Display content on the 404 error page
Else {
$ Url = str_replace ("archiver/", "archiver /? ", $ Url );
$ Str = file ("$ url ");
$ Count = count ($ str );
For ($ I = 0; $ I <$ count; $ I ++ ){
$ File. = $ str [$ I];
}
Echo $ file;
// Implement archiver /? Change xx.html to archiver/xx.html
}
?>