This is an old revision of the document!


Page forwarding (redirect)

Example: The page will be redirected to a subdirectory.

Adoption: phpwcms is located in the subdirectory http://example.com/wcms/

Standard entries in the conf.inc.php

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


Solution 1:

http://example.com/.htaccess

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


Solution 2:

http://example.com/index.php

<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location:wcms/");
exit;
?>
english/technics/tips/page-forwarding.1272004220.txt.gz · Last modified: 2018/06/03 18:08 (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