[pmwiki-users] Redirect from root to sub-dir in .php
DaveG
pmwiki at solidgone.com
Wed Dec 21 17:00:14 CST 2005
Here's waht I ended up using:
<?php
/* Redirect from solidgone.com to \pmwiki on mr2wiki.com with parameters
if any */
$host = $_SERVER['HTTP_HOST'];
$query = $_SERVER['QUERY_STRING'];
if ($host == 'www.solidgone.com' && $query=='') {
echo 'Nothing to see here, move along...';
} else {
$host='www.mr2wiki.com';
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
$extra = 'pmwiki/pmwiki.php';
header("Location: http://$host$uri/$extra?$query");
}
exit;
DaveG wrote:
> I want to place an index.php in my top-level directory that redirects
> the browser to /pmwiki/pmwiki.php, including all parameters. Simply
> putting this:
> <?php include('pmwiki/pmwiki.php');
>
> doesn't appear enough -- I think I actually need to change the directory?
>
> ~ ~ Dave
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://host.pmichaud.com/mailman/listinfo/pmwiki-users
>
More information about the pmwiki-users
mailing list