Moin moin
also folgendes habe ich in meinen Dateien..
subdomainhack/config/config.php
PHP-Code:
$GLOBALS['TL_HOOKS']['outputFrontendTemplate'][] = array('MySubdomainHack', 'addStaticUrl');
subdomainhack/MySubdomainHack.php
PHP-Code:
<?php
class MySubdomainHack
{
public function addStaticUrl($strText,$strTemplate)
{
if($strTemplate != 'fe_page')
{
return $strText;
}
$arrSearch = array
(
'="tl_files/',
'="system/',
'="plugins/',
);
$arrReplace = array
(
'=http://st1.hartl-racing.de/tl_files/',
'=http://st2.hartl-racing.de/system/',
'=http://st3.hartl-racing.de/plugins/',
);
return str_replace($arrSearch, $arrReplace, $strText);
}
}
?>
Fehlermeldung
Code:
Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/w00c5cff/system/modules/subdomainhack/config/config.php:3) in /www/htdocs/w00c5cff/system/libraries/Template.php on line 186
#0 /www/htdocs/w00c5cff/system/libraries/Template.php(186): __error(2, 'Cannot modify h...', '/www/htdocs/w00...', 186, Array)
#1 /www/htdocs/w00c5cff/system/modules/frontend/FrontendTemplate.php(184): Template->output('Content-Type: t...')
#2 /www/htdocs/w00c5cff/system/modules/frontend/PageRegular.php(136): FrontendTemplate->output()
#3 /www/htdocs/w00c5cff/index.php(198): PageRegular->generate()
#4 /www/htdocs/w00c5cff/index.php(321): Index->run(Object(DB_Mysql_Result))
#5 {main}
htaccess
Code:
<IfModule mod_deflate.c>
<FilesMatch "\.(css|js|xml)$">
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>
<IfModule mod_headers.c>
<FilesMatch "\.(js|css|xml|gz)$">
Header append Vary Accept-Encoding
</FilesMatch>
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/png A604800
ExpiresByType image/gif A604800
ExpiresByType image/jpg A604800
ExpiresByType image/jpeg A604800
ExpiresByType text/javascript A604800
ExpiresByType application/x-javascript A604800
ExpiresByType text/css A604800
</IfModule>
#Safe Modew Heck
AddHandler php-fastcgi .php
##
# Rewrite base
##
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^hartl-racing\.de$
RewriteRule ^(.*)$ http://www.hartl-racing.de/$1 [R=301,L]
##
# Block malicious requests
##
RewriteCond %{REQUEST_URI} (ftp|https?):|/etc/ [NC,OR]
RewriteCond %{QUERY_STRING} (ftp|https?):|/etc/ [NC]
RewriteRule .* - [F,L]
##
# Compress .js and .css files
##
AddEncoding gzip .gz
<FilesMatch "\.js\.gz$">
AddType "text/javascript" .gz
</FilesMatch>
<FilesMatch "\.css\.gz$">
AddType "text/css" .gz
</FilesMatch>
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME} \.(js|css)$
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule ^(.*)$ $1.gz [QSA,L]
##
# Rewrite TYPOlight URLs
##
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*\.html)$ index.php/$1 [L]
##
# Explicitly send a 404 header if a file on st[0-9].hartl-racing.de is not
# found. This will prevent the start page (empty URL) from being loaded.
##
RewriteCond %{HTTP_HOST} ^st[0-9]\.hartl-racing\.de [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* - [R=404,L]
##
# Do not dispatch dynamic resources via st[0-9].hartl-racing.de.
##
RewriteCond %{HTTP_HOST} ^st[0-9]\.hartl-racing\.de [NC]
RewriteCond %{REQUEST_FILENAME} \.(php|html)$
RewriteRule .* - [R=404,L]
Lesezeichen