[wp-hackers] Prevent Writing to .htaccess

Ryan Bilesky rbilesky at gmail.com
Thu Aug 5 14:31:12 UTC 2010


Forgive me if I am being nieve since I am still al little new to wordpress
but why can't WP have a way to set custom .htaccess rules and when WP
flushes .htaccess and readds WP rules it could readd your custom rules too.
Or make it so that you can block off a section of .htaccess using specific
comments to tell WP don't modify this section of .htaccess.

On Thu, Aug 5, 2010 at 7:26 AM, Eric Mann <eric at eamann.com> wrote:

> I agree, time for a patch.
>
> My recommendation would be to remove the direct function call that flushes
> the
> rules and instead use something like do_action('flush_rules');  Then re-add
> the
> function call with add_action().  This way, we can remove the function call
> when
> needed (i.e. in your case).
>
> On August 5, 2010 at 12:05 PM John Sessford <john at ikailo.com> wrote:
>
> > >One possibility (a very hacky possibility) would be to spoof the return
> value
> > >of got_mod_rewrite().
> >
> > This has potential. Wp_redirect does a similar thing.  Not as hacky as
> some of
> > the other stuff I've had to do. :)
> >
> > >Short version is that you can't do it. Not with the current code.
> >
> > Time for a patch maybe?
> >
> > Anyone have an explanation why the flush executes on the
> > /options-permalink.php page load?
> >
> > John Sessford
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list