Wordpress mod_rewrite conflicting with custom RewriteRule

Discussion in 'Apache' started by deejay1357, Mar 30, 2012.

  1. #1
    I have a Wordpress site with pretty permalinks turned on, so there's a .htaccess in the root with the usual mod_rewrite code:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    I also have a "clients" folder in the root with a folder for each client inside of it, and need URL requests for:

    /joeblogs or /joeblogs/

    to secretly serve up

    /clients/joeblogs/

    and for that, I have the following mod_rewrite code:

    RewriteEngine On
    RewriteRule ^joeblogs/?$ clients/joeblogs/

    My problem is that I can't seem to get the two sets of rules to play nice. I've read a bunch of other Digital Point mod_rewrite questions, but no matter where I place my custom rule, or try to create rewrite conditions to allow my client folders to be exceptions to the Wordpress blanket rewrites, I can't seem to get it working, and this Apache stuff is really making my head hurt.

    Might anyone be able to suggest the correct syntax for combining these two rewriting tasks?

    Thanks!
    Diane
     
    deejay1357, Mar 30, 2012 IP