IIS does not rewrite the method of implementing page static _php tutorial

Source: Internet
Author: User
Static pages made with rewrite actually do not exist, IIS (Microsoft Web server platform) Ewrite and unstable often 404, so there is this article.

Principle: 404 page type with PHP (as the current mainstream development language) (ASP also can), combined with thieves, to achieve page static

Use discuz! Forum archiver Example:
404 Program page: http://bbs.pkxp.com/error.php (as the current mainstream development language)
Demo: http://bbs.pkxp.com/archiver/
Error.php (as the current mainstream development language) Source:

$url = $_server[query_string];
$url = Str_replace ("404;", "", $url);
if (!ereg (Archiver, $url))
echo "404 Error";
404 error page display content
else {
$url = Str_replace ("archiver/", "archiver/", $url);
$str = File ("$url");
$count = count ($STR);
for ($i =0; $i < $count; $i + +) {
$file. = $str [$i];
}
Echo $file;
Achieve archiver/?xx.html into archiver/xx.html
}
?>

http://www.bkjia.com/PHPjc/508753.html www.bkjia.com true http://www.bkjia.com/PHPjc/508753.html techarticle static pages made with rewrite actually do not exist, IIS (Microsoft Web server platform) Ewrite and unstable often 404, so there is this article. Principle: 404 page type with PHP (as now ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.