[thelist] mod_rewrite problem... again...

Dunstan Orchard dunstan at 1976design.com
Fri Aug 29 17:10:28 CDT 2003

Hi there,

> On Fri, 29 Aug 2003, Dunstan Orchard wrote:
> > I am using an .htaccess file to do mod_rewrite things:
> > RewriteEngine On
> > RewriteRule ^seminars/boarding_kennel_seminar/?$ 
> > boarding_kennel_seminar.php 
> > [L]
> > RewriteRule ^seminars/dog_daycare_seminar/?$ dog_daycare_seminar.php [L]
> > RewriteRule ^seminars/?$ seminars.php [L]

> Kelly Hallman:
> Have you tried
> RewriteRule ^/seminars/dog_daycare_seminar/?$ /dog_daycare_seminar.php 
> [L] ...etc...?

yes, but unfortunately that's not where the problem is.
I don't think there's anything wrong with the rules, but the way the .htaccess 
file is being handled by the server.

when I've encountered these kinds of problems before it's been very odd - even 
after I've deleted the .htaccess file from the server the rules have continued 
to run - it's meant that whatever high level rules I first inserted into 
the .htaccess file continued to run, no matter what I inserted later on (or 
even, as I say, I then deleted the whole htaccess file).

I'm utterly confused :o(

> Damien COLA:
> I know NOTHING of those rules, but what it does if you put the last 
> rule first ? (RewriteRule ^seminars/?$ seminars.php [L]) I could be 
> something like cascading style sheets where the last rule override 
> previous rules. I know you said if you remove the last rule it's the 
> same effect (and it's strange) but try anyway.

the [L] means that if that rule can be run then it stops reading any other 
rules, so logically you have to put the one with the broadest spectrum at the 

> Perhaps you have already a .htaccess in a parent folder that has this rule 
> implemented, otherwise, why would it do that if there's no rule teling it to 
> do it ?

I have no idea. As I say above, in past attempts to run this kind of thing 
even deleting the file from the server has no effect - the rules continue to 
run from a file that doesn't exist!

it drives me mad.

well, thanks for suggestions guys, I shall see if the ISP can help at all.

cheers - dunstan

Dorset, England

More information about the thelist mailing list