I'm just wondering if it matters if I group all the RewriteRule's
together and Rewrite Cond's together, or does it particularly matter?
Would it be best to move that Rewrite Rule at the very end (which was
one of the hack prevention commands I found online, along with all those Rewrite Cond's) up with the other four original Rewrite Rules at the top?
Or group all the RewriteCond's at the top, before all the RewriteRule's?
It seems this is the way it's done in all the examples I looked at.
For your reference, records indicate that
super70s <super70s@super70s.invalid> wrote:
I'm just wondering if it matters if I group all the RewriteRule's
together and Rewrite Cond's together, or does it particularly matter?
I’m not sure the question makes sense. Rule order matters, and rule conditions only apply to the first rule that follows them. I’m not
sure what you think you will accomplish if you “group” things as you propose.
Would it be best to move that Rewrite Rule at the very end (which was
one of the hack prevention commands I found online, along with all those Rewrite Cond's) up with the other four original Rewrite Rules at the top?
Well, I’d say it’d be best to stop using PHP.
Otherwise, it is generally a good practice to put the most restrictive rules first, especially if they stop the rewriting process with an [L].
Or group all the RewriteCond's at the top, before all the RewriteRule's?
It seems this is the way it's done in all the examples I looked at.
You need to understand *why* the examples you see work the way they do.
Just copy-pasting directives and then shuffling them all around is a
recipe for disaster.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 286 |
Nodes: | 16 (2 / 14) |
Uptime: | 89:27:42 |
Calls: | 6,496 |
Calls today: | 7 |
Files: | 12,100 |
Messages: | 5,277,442 |