[Gelöst] HostEurope und "mod_rewrite
Posted: Thu Sep 03, 2009 9:23 am
Hallo zusammen,
ich bin gerade dabei CMSMADESIMPLE aufzusetzen und möchte natürlich auf das Feature "mod_rewrite" von Apache 2.2 nutzen. Da die Suchmaschinen eher mit richtigen URL's anfreunden werden.
Meine config.php sieht so aus:
Und hier natürlich noch die .htaccess - Datei:
CmsMadeSimple liegt nicht direkt im FTP-Root-Verzeichis sondern unter /tennis/cmsmadesimple/.
Wenn ich die Seite aufrufe und über die einzelnen Links fahre, sehe ich dass die URL's brav umgewandelt worden sind. Klicke ich dann einen Menüpunkt an, kommt Fehler 404 - Seite nicht gefunden!
Was habe ich vergessen bzw. übersehen?!
Grüße,
Dani
ich bin gerade dabei CMSMADESIMPLE aufzusetzen und möchte natürlich auf das Feature "mod_rewrite" von Apache 2.2 nutzen. Da die Suchmaschinen eher mit richtigen URL's anfreunden werden.
Meine config.php sieht so aus:
Code: Select all
#------------
#URL Settings
#------------
#What type of URL rewriting should we be using for pretty URLs? Valid options are:
#'none', 'internal', and 'mod_rewrite'. 'internal' will not work with IIS some CGI
#configurations. 'mod_rewrite' requires proper apache configuration, a valid
#.htaccess file and most likely {metadata} in your page templates. For more
#information, see:
#http://wiki.cmsmadesimple.org/index.php/FAQ/Installation/Pretty_URLs#Pretty_URL.27s
$config['url_rewriting'] = 'none';
#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '.htm';
#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy? (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = true;
#If using none of the above options, what should we be using for the query string
#variable? (ex. http://www.mysite.com/index.php?page=somecontent)
$config['query_var'] = 'page';
Code: Select all
Options +FollowSymLinks
RewriteEngine on
RewriteBase /tennis/cmsmadesimple/
# ReWrite Rule für News-Feed
# RewriteRule ^News/rss(.+)$ index.php?page=News/rss$1 [S=1]
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# RewriteCond %{REQUEST_URI} !/$
# RewriteCond %{REQUEST_URI} !\.
# RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+).htm$ index.php?page=$1 [QSA]
# Beginn CMSMS Security Einstellungen.
# Directory Browsing abschalten
Options -Indexes
Options +FollowSymLinks
# Zugriff auf config.php verbieten.
<Files "config.php">
order allow,deny
deny from all
</Files>
# No sense advertising what we are running
ServerSignature Off
# Spambots nach User_agent aussperren
RewriteCond %{HTTP_USER_AGENT} ^.*Whacker.*$ [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailCollector [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR]
RewriteCond %{HTTP_USER_AGENT} ^.*FileHound.*$ [OR]
RewriteCond %{HTTP_USER_AGENT} ^.*TurnitinBot.*$ [OR]
RewriteCond %{HTTP_USER_AGENT} ^.*JoBo.*$ [OR]
RewriteCond %{HTTP_USER_AGENT} ^.*adressendeutschland.*$
RewriteRule ^.* - [F]
# 1. unterbindet, das fremde Seiten geladen werden
RewriteCond %{QUERY_STRING} ^(.*)=http://(.*) [OR]
# 2. blockiert libwww (Ausgangspunkt f¸r diverse Hackversuche)
RewriteCond %{HTTP_USER_AGENT} ^libwww [OR]
# Blockiert Skripte, die versuchen, base64 encodierten Unsinn via URL zu versenden
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Blockiert Skripte, die einen a ********** Tag in der URL enthalten
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Blockiert Skripte, die versuchen, PHP GLOBALS Variablen via URL zu ver‰ndern
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Blockiert Skripte, die versuchen, eine _REQUEST Variable via URL zu ver‰ndern
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2}) [OR]
# END Optional Settings
Wenn ich die Seite aufrufe und über die einzelnen Links fahre, sehe ich dass die URL's brav umgewandelt worden sind. Klicke ich dann einen Menüpunkt an, kommt Fehler 404 - Seite nicht gefunden!
Was habe ich vergessen bzw. übersehen?!
Grüße,
Dani