wir haben ein simples Contenido System mit nur einem Mandanten um das es hier gehen soll.
Nach dem Update auf 4.10.1 haben wir im /cms Ordner mit dem AMR eine neue .htaccess erzeugen lassen.
Da unsere Domain direkt in den /cms Ordner zeigt, haben wir die Rewrite Base geändert.
Somit kommt das hier zustande:
Code: Alles auswählen
################################################################################
# CONTENIDO AMR plugin restrictive rewrite rules set.
#
# Contains strict rules, each rewrite exclusion must be set manually.
# - Exclude requests to directories usage/, contenido/, setup/, cms/upload/
# - Exclude requests to cms/front_content.php
# - Pass thru requests to common ressources (pictures, movies, js, css, pdf)
#
# @version 0.0.1
# @author Murat Purc <murat@purc.de>
# @copyright four for business AG <www.4fb.de>
# @license http://www.contenido.org/license/LIZENZ.txt
# @link http://www.4fb.de
# @link http://www.contenido.org
# @since file available since CONTENIDO release 4.9.0
#
# $Id$
################################################################################
# Enable following lines to run PHP5 on 1und1.de (1and1.com)
#AddType x-mapp-php5 .php
#AddHandler x-mapp-php5 .php
<IfModule mod_rewrite.c>
# Enable rewrite engine
RewriteEngine on
# Specify a base URL-path for the rules
RewriteBase /
# Catch some common exploits in query string to get rid of them.
# NOTE: Conditions to prevent protocols (ftp, http[s]) in query string could
# be a disadvantage in some cases.
RewriteCond %{QUERY_STRING} contenido_path=.*$ [NC,OR]
RewriteCond %{QUERY_STRING} cfg\[path\]=.*$ [NC,OR]
RewriteCond %{QUERY_STRING} _PHPLIB\[libdir\]=.*$ [NC,OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} ftp://.*$ [NC,OR]
RewriteCond %{QUERY_STRING} http[s]*://.*$ [NC]
RewriteRule ^.* - [F,L] # all matching conditions from above will end in nirvana
# Exclude some files and directories from rewriting
RewriteRule ^usage/.*$ - [L]
RewriteRule ^contenido/.*$ - [L]
RewriteRule ^setup/.*$ - [L]
RewriteRule ^cms/upload/.*$ - [L]
RewriteRule ^cms/test/.*$ - [L]
RewriteRule ^cms/front_content.php.*$ - [L]
RewriteRule ^cms/dbfs.php.*$ - [L]
# Exclude common extensions from rewriting and pass remaining requests to
# front_content.php.
RewriteRule !\.(avi|css|doc|flv|gif|gzip|ico|jpeg|jpg|js|mov|mp3|pdf|png|ppt|rar|svg|swf|txt|wav|wmv|xml|zip)$ front_content.php [NC,QSA,L]
</IfModule>
# Some rules to compress files.
# NOTE: Following settings are not mod rewrite specific, but enabling mod_deflate
# for some file types can help to reduce bandwith.
<IfModule mod_deflate.c>
<FilesMatch "\.(js|css|html|htm|php|xml)$">
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>
Problematisch sind jetzt die Dateien die nicht existieren.
Gebe ich z.B. https://domain/test-irgendwas-im-nirvana ein, komme ich wie gewollt auf die Startseite
Gebe ich nun aber z.B. https://domain/upload/pdf/test-irgendwas-im-nirvana.pdf ein, komme ich auf eine "weiße" Seite mit folgendem Quelltext:
Code: Alles auswählen
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
html, body, #partner, iframe {
height:100%;
width:100%;
margin:0;
padding:0;
border:0;
outline:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
}
body {
overflow:hidden;
}
</style>
<meta content="NOW" name="expires">
<meta content="index, follow, all" name="GOOGLEBOT">
<meta content="index, follow, all" name="robots">
<!-- Following Meta-Tag fixes scaling-issues on mobile devices -->
<meta content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" name="viewport">
</head>
<body>
<div id="partner"></div>
<script type="text/javascript">
document.write(
'<script type="text/javascript" language="JavaScript"'
+ 'src="//sedoparking.com/frmpark/'
+ window.location.host + '/'
+ 'IONOSParkingDE'
+ '/park.js">'
+ '<\/script>'
);
</script>
</body>
</html>
Darf die Domain überhaupt direkt in den Mandanten Ordner zeigen?
Contenido: 4.10.1
Advanced Mod Rewrite: 1.0.0
PHP: 7.3
Hoster: 1und1