Using table_prefix for multiple blogs
-
my objective is to use a single wp installation for various blogs.
and i need to do this with wp, not wpmu.following is my code:
if(!$_SESSION) session_start(); if(isset($_GET['blog']) && $_GET['blog'] != ''){ $blog = trim(strip_tags($_GET['blog'])); $table_prefix = $_SESSION['table_prefix'] = 'wp_'.$blog.'_'; header('Location: https://ww.dir.vc/demo/'); //back to same URL without the ?... exit; } else if(isset($_SESSION['table_prefix'])) { $table_prefix = $_SESSION['table_prefix']; } else { die('no blog found'); }
it does register table_prefix,…gets redirected to an absolute URL, and then shows me a blank page
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Using table_prefix for multiple blogs’ is closed to new replies.