~automne-team/automne/4.2

« back to all changes in this revision

Viewing changes to 403.php

  • Committer: sebastien-pauchet
  • Date: 2012-01-13 13:13:00 UTC
  • Revision ID: seb@automne-cms.org-20120113131300-33kvm2zhfcdz0kbb
Change method to load CMS_object_definition to use static cache.
Correct a bug in 403.php and test for htaccess support

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
//try to get website by domain to serve specific 403 page
37
37
$domain = @parse_url($_SERVER['REQUEST_URI'], PHP_URL_HOST) ? @parse_url($_SERVER['REQUEST_URI'], PHP_URL_HOST) : (@parse_url($_SERVER['HTTP_HOST'], PHP_URL_HOST) ? @parse_url($_SERVER['HTTP_HOST'], PHP_URL_HOST) : $_SERVER['HTTP_HOST']);
38
 
if ($domain) {
 
38
$path = @parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
 
39
if ($domain && strpos($path, 'htaccess.txt') === false) {
39
40
        $website = CMS_websitesCatalog::getWebsiteFromDomain($domain);
40
41
        if ($website && !$website->hasError()) {
41
42
                //check if website has a 403 page defined