ustimenko (ustimenko) wrote,
ustimenko
ustimenko

Эмуляция auto_prepend_file там, где нельзя и есть mod_rewrite

В .htaccess пишем


RewriteEngine on
RewriteRule    \.php$  prepend.php

В prepend.php пишем


<?
if ($_SERVER['REDIRECT_URL']) {
    include $_SERVER['DOCUMENT_ROOT'] . $_SERVER['REDIRECT_URL'];
}
?>
Tags: apache, php, хостинг
Subscribe
  • Post a new comment

    Error

    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments