NYCPHP Meetup

NYPHP.org

[nycphp-talk] htaccess question - deafult behavior in one folder

Jesse Callaway bonsaime at gmail.com
Wed May 6 19:15:02 EDT 2009


Hey Corey,

Try  !^/blog.*$ if you end up installing Drupal under Wordpress...
just kidding. But the fewer passes to mod_rewrite the happier everyone
is. That pattern ought to tell it to ignore anything after /blog in
the URL without any further rules.

mod_rewrite is mind blowing sometimes... Try the logging options to
see all the insanity behind the scenes.

-jesse

On Wed, May 6, 2009 at 6:32 PM, Corey H Maass - gelform.com
<corey at gelform.com> wrote:
> Ooh, great! I actually combined the two responses. Adding:
> RewriteCond %{REQUEST_URI} !^/blog
> worked for /blog, but anything after blog (/blog/2009/my-post) still
> gave me a 404. So then I added an .htaccess to /blog/ to redirect to
> it's root and it worked. Thanks!
>
> On Wed, 6 May 2009 17:53:07 -0400 (EDT), "Ajai Khattri"
> <ajai at bitblit.net> said:
>> On Wed, 6 May 2009, Corey H Maass - gelform.com wrote:
>>
>> > I have a site that uses the Zend framework. I want to run a blog at
>> > /blog. I tried installing wordpress in an actual folder at /blog but my
>> > htaccess is set to have anything that doesn't point to an actual file
>> > redirect to index.php for zend. wordpress relies on blog/ directing to
>> > blog/index.php. Here's what I've got:
>> >
>> > RewriteCond %{REQUEST_FILENAME} !-f
>> > RewriteRule .* index.php
>> >
>> > So I need a rule that says, 'anything in /blog, just do what you
>> > normally do' but I'm not sure how to go about that. I've dug thru
>> > htaccess tutorials but I'm not finding anything.
>>
>> IIRC, you can use RewriteEngine Off to cancel rewrite rules in a parent
>> .htaccess file.
>>
>>
>> --
>> Aj.
>>
>> _______________________________________________
>> New York PHP User Group Community Talk Mailing List
>> http://lists.nyphp.org/mailman/listinfo/talk
>>
>> http://www.nyphp.org/show_participation.php
>
> //
> Corey H Maass
> Gelform Design
> Brooklyn, NY
> Web design and development for art and business
>
> em corey at gelform.com
> ww http://www.gelform.com
> ph 646/228.5048
> fx 866/502.4861
> IM gelform
>
> _______________________________________________
> New York PHP User Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/show_participation.php
>



More information about the talk mailing list