• The following list of items would imho improve the currently generated htacces file and drop the number of posts on this subject:

    • add structure and comments to rules: group rules give them a #title that explains their function etcetara
    • order rules from specific to general: put the category rule at the bottom to prevent (future) trouble (RewriteRule ^archives/?(.*) /index.php?category_name=$1 [QSA]
      should be at the bottom
    • warn against giving the category and archives path the same “start folder” (i.e. both of them ‘archives’ and if not, let htacces generator delete the first ‘?’ in the archives rule when the same names are given. ( RewriteRule ^archives/([0-9]{4})<delete?/>/?([0-9]{1,2})?/?([0-9]{1,2})?/?([_0-9a-z-]+)?/?$ /index.php?year=$1&monthnum=$2&day=$3&name=$4 [QSA]note that for equal folder names to work correctly item 1 of this list is also required otherwise all requests are taken by the more general category rule
    • add the following flags to all rules: [QSA,NC,L]
      [NC] for accidenly caps lock entered URI’s but more important [L] to stop htaccess being executed when the corresponding rule has been found and thus speeding things up. (or is this function alreadly built in the [QSA] flag?)
    • (not directly htaccess related)
      put the default category path (‘/categories/’ I believe it is) in the options/permalinks category path textbox so people can delete it and create a structure like https://www.domain.com/categoryname/. In other words: power the user to overwrite the path with pure nothingness
    • list addicts live longer

Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘htaccess improvement list’ is closed to new replies.