Hi Just trying to figure how to write a redirect 410 for an entire directory except for a single file that is to be 301'd to a new location.
tx.
phranque
10:45 pm on Nov 6, 2013 (gmt 0)
first, a RewriteRule with the [R=301,L] flag to handle the more specific file redirect. then, a separate RewriteRule using the [G] flag to provide the 410 status code for the more general directory case.
santapaws
10:54 pm on Nov 6, 2013 (gmt 0)
does that L flag stop any rules from running or just the next rewrite rule? tx.
The [L] flag causes mod_rewrite to stop processing the rule set.
it's more complicated than that, so you should really read and understand the entire section.
lucy24
1:13 am on Nov 7, 2013 (gmt 0)
does that L flag stop any rules from running or just the next rewrite rule? tx.
Each module is an island. So even if mod_rewrite has already handed out a decisive 403, all the other mods still have to run.
Ordinarily you list rules in order of severity, so a 410 would come before a 301. But sometimes-- like here-- it's more practical to put some rules out of sequence.