RewriteCond not recognized

software development


I’ve been going nutz trying to figure out what I’m doing wrong here.

I want my url to auto rewrite to a sub directory, but my RewriteCond is not being recognized.

Ex. I want to be rewritten to

Here is the code in my .htaccess file:

[code]Options +FollowSymlinks
RewriteEngine on

RewriteCond %[REQUEST_URI] !^/cobedo/.*
RewriteRule ^(.*)$ [L][/code]

Right now i just have it rewriting to google to test it out.

The problem that I am running into is that the url is getting rewritten even when i am in the /cobedo directory.

So this line is failing and I have no idea why:
RewriteCond %[REQUEST_URI] !^/cobedo/.*

Any suggestions?



Curly brackets on the variable, not square brackets.


That did not work :frowning:


are you requesting something in cobedo or just because your condition is that there must be something there. you can add (/.)? to make it optional

also, adding [NC] makes it case insensitive


Arg, that did it. I’m a little embarrassed at the solution. Thanks guys!!!