[thelist] htaccess mod_rewrite help please!!!

Anthony Baratta anthony at baratta.com
Tue Oct 3 16:47:59 CDT 2006


Just guessing here based upon a few web page hits:

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase %{PATH_INFO}
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule %{PATH_INFO}/index.php [L]
</IfModule>

Might get you into the right direction, or lead you off a cliff. ;-)

-----Original message-----
From: Stephen Rider evolt_org at striderweb.com
Date: Tue, 03 Oct 2006 14:28:08 -0700
To: thelist at lists.evolt.org
Subject: [thelist] htaccess mod_rewrite help please!!!

> Hello all --
> 
> I have what is probably an unusual issue, here, so I hope  
> you .htaccess experts can help me out.  I'll try to be brief, but it  
> takes a bit of explaining...
> 
> I have an install of Wordpress blog software that I want to use to  
> run multiple blogs.  To do this, I am using a method where basically  
> I have the install in one directory /blog/ and a symbolic link, / 
> blog2/ (and /blog3/, /blog4/...) that points to the /blog/ directory.
> 
> The only change to the basic Wordpress code is that the config.php  
> file that gets us into the database is replaced with a bit of code  
> that says "If we're in /blog/, call this config file; if we're in / 
> blog2/, call that config file".  The different config file points to  
> a different database, and thus you have a totally different blog with  
> the one install.  Method detailed here: <http://www.mertner.com/allan/ 
> index.php?p=23>
> 
> Everything working swimmingly so far.  Except...
> 
> Wordpress uses a default mod_rewrite (in the /blog/.htaccess file) to  
> customize the hierarchy of posts.  The default rewrite block is thus:
> 
> <IfModule mod_rewrite.c>
> RewriteEngine On
> RewriteBase /blog/
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule . /blog/index.php [L]
> </IfModule>
> 
> This works just great for the first blog at /blog/, but for the one  
> at /blog2/ (the symbolic link "directory"), the rewrite kicks in as  
> though we're in /blog/.
> 
> Can anyone help me rework this?  I want to tell the rewrite block,  
> essentially, "If the directory structure starts with /blog/, point  
> to /blog/index.php.  If it starts with /blog2/ point to /blog2/index.php
> 
> I'm pretty sure this would work with the right RewriteCond, but I  
> can't figure out how to phrase it.
> 
> Thank you so much for any help.  I've been beating my head against  
> this install for a while now!
> 
> Stephen Rider
> -- 
> 
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> 
> For unsubscribe and other options, including the Tip Harvester 
> and archives of thelist go to: http://lists.evolt.org 
> Workers of the Web, evolt ! 
> 



More information about the thelist mailing list