Exemple #1
0
define('SEO42_REWRITEMODE_INHERIT', 2);
define('SEO42_NO_DOUBLE_CONTENT_REDIRECT_NONE', 0);
define('SEO42_NO_DOUBLE_CONTENT_REDIRECT_ONE_DOMAIN_ONLY', 1);
define('SEO42_NO_DOUBLE_CONTENT_REDIRECT_NON_WWW_TO_WWW', 2);
define('SEO42_NO_DOUBLE_CONTENT_REDIRECT_WWW_TO_NON_WWW', 3);
define('SEO42_NO_DOUBLE_CONTENT_REDIRECT_ONLY_HTTPS', 4);
define('SEO42_NO_DOUBLE_CONTENT_REDIRECT_AVAILABILITY_FRONTEND_BACKEND', 0);
define('SEO42_NO_DOUBLE_CONTENT_REDIRECT_AVAILABILITY_FRONTEND', 1);
define('SEO42_AUTO_REDIRECT_NONE', 0);
define('SEO42_AUTO_REDIRECT_ARTICLE_ID', 1);
define('SEO42_AUTO_REDIRECT_URL_REWRITE', 2);
define('SEO42_AUTO_REDIRECT_URL_REWRITE_R3', 3);
// default settings (user settings are saved in data dir!)
$REX['ADDON']['seo42']['settings'] = array('rewriter' => true, 'url_ending' => '.html', 'hide_langslug' => 0, 'homeurl' => 2, 'homelang' => 0, 'no_double_content_redirects' => SEO42_NO_DOUBLE_CONTENT_REDIRECT_ONE_DOMAIN_ONLY, 'no_double_content_redirects_availability' => SEO42_NO_DOUBLE_CONTENT_REDIRECT_AVAILABILITY_FRONTEND, 'auto_redirects' => SEO42_AUTO_REDIRECT_NONE, 'smart_redirects' => true, 'sync_redirects' => false, 'sync_redirects_only_online' => false, 'redirects_allow_regex' => false, 'redirects_max_age' => 0, 'css_dir' => '/resources/css/', 'js_dir' => '/resources/js/', 'images_dir' => '/resources/images/', 'icons_dir' => '/resources/icons/', 'seo_friendly_image_manager_urls' => true, 'full_urls' => false, 'allow_article_id' => false, 'ignore_root_cats' => false, 'url_whitespace_replace' => '-', 'url_start' => '/', 'url_start_subdir' => './', 'remove_root_cats_for_categories' => array(), 'no_url_for_categories' => array(), 'include_query_params' => true, 'ignore_query_params' => array(), 'force_download_for_filetypes' => array(), 'send_header_x_ua_compatible' => true, 'fix_image_manager_cache_control_header' => false, 'static_sitemap_priority' => true, 'no_robots_txt_auto_disallow' => true, 'robots' => '', 'google_site_verification_filename' => '', 'robots_follow_flag' => 'follow', 'robots_archive_flag' => 'noarchive', 'title_delimiter' => '-', 'seopage' => true, 'title_preview' => true, 'no_prefix_checkbox' => false, 'custom_canonical_url' => false, 'noindex_checkbox' => false, 'urlpage' => true, 'all_url_types' => true, 'pagerank_checker' => true, 'redirects' => true, 'redirects_compact_view' => false, 'one_page_mode' => false, 'pagerank_checker_unlock' => false, 'global_special_chars' => '', 'global_special_chars_rewrite' => '', 'urlencode_whitespace_replace' => '_', 'urlencode_lowercase' => false, 'lang' => array(0 => array('code' => 'de', 'original_name' => 'deutsch', 'rewrite_mode' => SEO42_REWRITEMODE_SPECIAL_CHARS, 'special_chars' => 'Ä|ä|Ö|ö|Ü|ü|ß|&', 'special_chars_rewrite' => 'Ae|ae|Oe|oe|Ue|ue|ss|und', 'inherit_from_clang' => 0)));
// overwrite default settings with user settings
seo42_utils::includeSettingsFile();
// include cached redirects
seo42_utils::includeRedirectsFile();
// pre init seo42 vars
seo42::init();
// fix for iis webserver: set request uri manually if not available
seo42_utils::requestUriFix();
// do redirects
seo42_utils::noDoubleContentRedirect();
if (!$REX['REDAXO']) {
    seo42_utils::redirect();
}
// check for expired redirects
if (seo42_utils::redirectsDoExpire()) {
    seo42_utils::checkExpiredRedirects();
}