RewriteCond and RewriteRule newbie
Posted
by mybrokengnome
on Stack Overflow
See other posts from Stack Overflow
or by mybrokengnome
Published on 2010-04-06T19:16:41Z
Indexed on
2010/04/06
19:33 UTC
Read the original article
Hit count: 280
I'm taking over a website for a client that is running on a custom built CMS (that I didn't write). I don't mess with .htaccess files usually because a lot of the hosting I do is on IIS, or I used WordPress as a CMS and don't have to worry about messing with the .htaccess file. Here's the contents of the file:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ framework.php?%{QUERY_STRING}&resource=$1& [L]
I get what it's doing (sending all requests through the framework.php file). The client wants a WordPress blog added to their site. I'm placing it in a /blog/ folder. The problem is that because of the rewrite rules and conditions in the .htaccess file whenever I try to go /blog/ the other CMS freaks out because it doesn't like me trying to go there. My question is how do I write a rule/cond that tells apache to send all requests made to the /blog/ folder to the /blog/ folder, but keep all other requests piped through the framework.php file like it is now? Any help is appreciated, thanks!
© Stack Overflow or respective owner