kid_drew Posted August 5, 2008 Share Posted August 5, 2008 Hey everybody, So I'm trying to set up a WinXP multi-site drupal box, which allows you to create multiple sites using the same code base and different databases. I can get the databases set up correctly, but my problem is redirecting with .htaccess. I'm a PHP programmer, not a system admin, and I don't know all that much about mod_rewrite. Anyway, here's the situation. Webroot is located at i:\webroot and drupal is at i:\webroot\drupal. I need multiple subdirectories to pull the code from the i:\webroot\drupal webroot directory. So, to illustrate: http://www.example.com/app1 will pull from i:\webroot\drupal http://www.example.com/app2 will also pull from i:\webroot\drupal http://www.example.com/app3 is not a drupal app, so it will pull from i:\webroot\app3 as you would expect it to. Do I do that using mod_rewrite, VirtualHost, VirtualDocumentRoot? I'm a bit lost with all the options. Thanks -Drew Quote Link to comment https://forums.phpfreaks.com/topic/118268-htaccess-rewrite/ Share on other sites More sharing options...
texerasmo Posted August 7, 2008 Share Posted August 7, 2008 If the your problem is with apache is not read .htaccess try add code in httpd.conf under VirtulHost <Directory "/var/www/....../"> Options FollowSymLinks ExecCGI AllowOverride All Allow from All Deny from none Order allow,deny </Directory> Quote Link to comment https://forums.phpfreaks.com/topic/118268-htaccess-rewrite/#findComment-610668 Share on other sites More sharing options...
kid_drew Posted August 7, 2008 Author Share Posted August 7, 2008 After more research on my end, I'm convinced I need to do a rewrite and not a VirtualHost. Thanks for the reply texerasmo, but I'm not sure what to take out of what you wrote. I know how VirtualHosts are set up in terms of mapping multiple domain names to one box, but I specifically want this URL mapping: http://www.example.com/site1 should look for code in i:\webroot\drupal http://www.example.com/site2 should ALSO look for code in i:\webroot\drupal Neither of these apps have unique domain names. The URLs are exactly as I have typed them (with one domain replacing example.com of course). I could very well be wrong, but without a more specific example from you, I'm not convinced. -Drew Quote Link to comment https://forums.phpfreaks.com/topic/118268-htaccess-rewrite/#findComment-610729 Share on other sites More sharing options...
corbin Posted August 7, 2008 Share Posted August 7, 2008 I think he was trying to show how to make Apache read .htaccess files (which entirely off topic x.x). I suggest an Alias directive. http://httpd.apache.org/docs/2.2/mod/mod_alias.html Quote Link to comment https://forums.phpfreaks.com/topic/118268-htaccess-rewrite/#findComment-611155 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.