This is an old revision of the document!


Seitenweiterleitung (Redirect)

Beispiel: Die Seite soll in ein Unterverzeichnis weitergeleitet werden.

Annahme: phpwcms liegt im Unterverzeichnis http://example.com/wcms/

Standardeinträge in der conf.inc.php

// site values
$phpwcms['site']              = 'http://'.$_SERVER['SERVER_NAME'].'/';
 
// paths
$phpwcms['DOC_ROOT']          = $_SERVER['DOCUMENT_ROOT'];
$phpwcms['root']              = 'wcms';         //default: ''


Lösung 1:

.htaccess

RewriteEngine on
RewriteRule ^(.*) http://example.com/wcms/ [R,L]


Lösung 2:

index.php

<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location:wcms/");
exit;
?>
deutsch/technik/tips/seiten-weiterleitung.1272003340.txt.gz · Last modified: 2018/06/03 18:06 (external edit)
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0