hey there,
i believe i have multsite_manager setup properly using clean urls, and it does seem to work, however when you goto one of the sub-sites - all the links are missing the {shortname} that is specified... rendering the primary links URL in the format of /site/forum instead of /site/wap/forum
so again to review, i am able to to goto *.com/site/wap/ but then all the links are ending up *.com/site/forum instead of *.com/site/wap/forum which im guessing should be the intended operation
My .htaccess due to clean url's being used
RewriteEngine on
#file access
RewriteRule ^\w+/(modules|misc|files|themes|sites)(.*)$ ./$1$2 [L]
RewriteRule ^/(modules|misc|files|themes|sites)(.*)$ ./$1$2 [L]
#special php scripts
RewriteRule ^\w+/(update.php|install.php|index.php)(.*)$ ./$1$2 [L,QSA]
#site sub-section
RewriteCond %{REQUEST_FILENAME} ^/home/user/public_html/thewebsite.com/site/.*
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^\w+(/)?(.*)$ index.php?q=$2 [L,QSA]
#### clean url stuff should be further down in default file
replacing the /user/ and /thewebsite.com/ with the particular specific information
and then my settings.php which is locate in /sites/wap.thewebsite.com/settings.php
$matches = FALSE;
if (preg_match("|thewebsite.com|",$_SERVER["HTTP_HOST"])
&& preg_match("|^/site/(\w+)|",request_uri(), $matches)
&& $matches)
{
$my_site_base = $matches[1];
$db_prefix = "". $my_site_base ."_";
$base_url = "http://thewebsite.com/site/". $my_site_base .""; // NO trailing slash!
$db_url = "mysql://DBuser:DBpassword@localhost/actual_database";
$db_prefix = '';
///This assumes you have a ./files directory in your base drupal directory
$conf = array(
"file_directory_path" => "files/".$my_site_base,
);
}
ive done a bit of research and testing, it doesnt seem like im doing anything wrong, but i could be wrong on that notion as well. the database for the new multisite does get created and seems to be populated. could it be a setting in the database causing it? i dont know, im kinda lost as to where to start with resolving this...
any suggestions would be much appreciated
Comments
Comment #1
schuyler1d commentedThe issue is the sites/ directory. It should be
/sites/thewebsite.com/settings.php
or
/sites/thewebsite.com.site/settings.php
or
/sites/default/settings.php
Comment #2
vishun commentedyeah, in my original post i had a line above my actual settings.php that said:
"and then my settings.php which is locate in /sites/wap.thewebsite.com/settings.php"
regarding the .htaccess file, the instructions said to specify things with /site/ but ill try change that i suppose
EDIT: i just changed the first RewriteCond %{REQUEST_FILENAME} to reference /sites/.* and that didnt seem to help
Comment #3
schuyler1d commented"/sites/wap.thewebsite.com/settings.php" does NOT equal any of my suggestions above. The "wap." is breaking it.
Comment #4
vishun commentedah i see, so it wont work for subdomains? im basically trying to make a WAP site version of my site, by way of a multi-site with a different theme.. also was picturing other full domains, that should work right? let me try add a main level domain and see if that works
thanks
Comment #5
schuyler1d commentedit can work for subdomains, but the directory is /sites/ needs to be more inclusive than specfic sites. if you're going to build a bunch of sites at
wap.example.com/site/foo1, wap.example.com/site/foo2, etc.
then you're right, it can be in ./sites/wap.example.com.site/settings.php
BUT
if, as your original request implied that 'wap' was only ONE of the sites you'd make, then it would be in ./sites/example.com.site/settings.php (which will still work for wap.example.com, but the way) and you'd be creating sites like
wap.example.com, foo1.example.com, foo2.example.com, etc.
(but then you'll also need a different settings.php file based on that model)
Comment #6
vishun commentedalthough subdomains would be nice for a mobile site, i believe i have figured out the perfect alternative as it uses the live DB data as opposed to the multisite approach of copying the main DB tables.
however, this does lead me to my long term goal, which is setting up multiple sites that would have complete different content, a similar theme, and preferably shared aspects like users, sessions, profiles, and such. the shared aspect for those specific tables i have figured out, however if you have some insight on how to setup the settings properly to add other top level domains, that would be rockin
im looking to make one core user system shared between about 5 sites, the rest of which have yet to be setup, however i do have the domain names and hosting means to get that rockin... id probably pay for help at this point ;)
Comment #7
schuyler1d commentedno time to work on other projects. not sure about everything you're trying to do, but good luck.
The documentation in the default settings.php file is pretty clear about how to share users in a multisite setup. If you have a multisite_manager settings.php-type setup, then you'll obv. have to customize the lines setting the $db_url and $db_prefix, but with some PHP should be straightforward.