Quick .htaccess question (MOD_REWRITE)

Discussion in 'Apache' started by i3urn, May 23, 2012.

  1. #1
    Question one:
    Im in the middle of making some blog software when i noticed a error on the blog the posts are organised as domain.com/category/post and only one category is allowed but i tested domain.com/category/category/category/post and it brings up the same as domain.com/category/post i have written a quick PHP hack for it but im wondering if the error can be fixed in the .htaccess file itself.

    The .htaccess that im using:
    RewriteRule ([a-zA-Z-0-9_]+)/([a-zA-Z-0-9_]+)/?$ post.php?category=$1&post=$2 [L,QSA]
    Code (markup):
    Thanks,
    i3urn
     
    i3urn, May 23, 2012 IP