Jump to content

.htaccess Rewrite


kid_drew

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/118268-htaccess-rewrite/
Share on other sites

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>

 

Link to comment
https://forums.phpfreaks.com/topic/118268-htaccess-rewrite/#findComment-610668
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/118268-htaccess-rewrite/#findComment-610729
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.