Title: htaccess improvement list
Last modified: January 20, 2017

---

# htaccess improvement list

 *  [thomasmaas](https://wordpress.org/support/users/thomasmaas/)
 * (@thomasmaas)
 * [22 years ago](https://wordpress.org/support/topic/htaccess-improvement-list/)
 * 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 [http://www.domain.com/categoryname/.](http://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)

 *  [MaxT](https://wordpress.org/support/users/maxt/)
 * (@maxt)
 * [22 years ago](https://wordpress.org/support/topic/htaccess-improvement-list/#post-56970)
 * categories in htaccess are bad idea imho… people add/remove categories all the
   time, and posts are moved from 1 category to another. It’ll lead to lot of 404
   @ searchengines I think.
 *  Anonymous
 * [22 years ago](https://wordpress.org/support/topic/htaccess-improvement-list/#post-56975)
 * Thomas, email Matt ([http://photomatt.net/](http://photomatt.net/)) on this .
 *  Thread Starter [thomasmaas](https://wordpress.org/support/users/thomasmaas/)
 * (@thomasmaas)
 * [22 years ago](https://wordpress.org/support/topic/htaccess-improvement-list/#post-56979)
 * Hi Matt,
    Anonymous told me to e-mail you so everything’s cool..:-) but maybe
   I should. Just a bit of fear that there’s a big bug in my thoughts. I would like
   some more feedback before ringing at Mr. programmer’s door.
 *  [junesix](https://wordpress.org/support/users/junesix/)
 * (@junesix)
 * [22 years ago](https://wordpress.org/support/topic/htaccess-improvement-list/#post-57010)
 * Reading this thread got me thinking… isn’t the additional `/archives/` essentially
   cruft in itself? I know I’m probably opening a can of worms on this one.
    If 
   a front page is [http://yourdomain.com](http://yourdomain.com) then [http://yourdomain.com/year/month/](http://yourdomain.com/year/month/)
   and [http://yourdomain.com/category/](http://yourdomain.com/category/) should
   imply archive pages. It just seems like the additional `/archives/` directory
   doesn’t do much besides lengthen the URIs. For me, this makes even more sense
   as my “static” pages like About and Photos aren’t really static pages but actually
   archive pages using custom templates.
 *  Thread Starter [thomasmaas](https://wordpress.org/support/users/thomasmaas/)
 * (@thomasmaas)
 * [22 years ago](https://wordpress.org/support/topic/htaccess-improvement-list/#post-57021)
 * There’s one but: if you want to have a page with an overview of your archives,
   most logically this would be [http://www.domain.com/archives/.](http://www.domain.com/archives/.)
   Then a page within this archive would logically be something like [http://www.domain.com/archives/2004/05/](http://www.domain.com/archives/2004/05/)
   that is, if you see your site as a tree structure.
    Where I do see your point:
   categories. Normally categories are part of your navigation so you don’t need
   a page like [http://www.domain.com/categories/](http://www.domain.com/categories/)
   to list all your categories because they are alreadly listed on, let’s say, every
   page. Therefore, [http://www.domain.com/categoryname/](http://www.domain.com/categoryname/)
   seems much cleaner than [http://www.domain.com/categories/categoryname/](http://www.domain.com/categories/categoryname/)
   In the end it’s a personal thing I guess.
 *  [charle97](https://wordpress.org/support/users/charle97/)
 * (@charle97)
 * [22 years ago](https://wordpress.org/support/topic/htaccess-improvement-list/#post-57029)
 * junesix,
    run a site with mt and then you’ll find out the necessity of the archives
   directory.
 *  [johne59](https://wordpress.org/support/users/johne59/)
 * (@johne59)
 * [22 years ago](https://wordpress.org/support/topic/htaccess-improvement-list/#post-57379)
 * Since .htaccess and mod-rewrite don’t work on an IIS server, I’d like to know
   if there’s any other avenue to modify the permalinks structure on IIS ?

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘htaccess improvement list’ is closed to new replies.

 * In: [Requests and Feedback](https://wordpress.org/support/forum/requests-and-feedback/)
 * 7 replies
 * 6 participants
 * Last reply from: [johne59](https://wordpress.org/support/users/johne59/)
 * Last activity: [22 years ago](https://wordpress.org/support/topic/htaccess-improvement-list/#post-57379)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
