i have following .htaccess config:
rewriteengine on rewritebase / rewriterule ^model/([^/\.]+)/?$ /model/index.php?u=$1 [l,nc,qsa] rewriterule ^collections/([^/\.]+)/?$ /collections/index.php?c=$1 [l,nc,qsa] rewriterule ^general/([^/\.]+)/?$ /general/index.php?p=$1 [l,nc,qsa] rewriterule ^blog/([^/\.]+)/?$ /blog/index.php?e=$1 [l,nc,qsa] rewriterule ^blog/archive/ /blog/archive/index.php [l,nc,qsa]
what need enable http://example.org/blog/archive/ url , in such directory there index.php file.
the problem above rule /blog/ take action instead of last one.
what should do?
change order of rules:
rewriteengine on rewritebase / rewriterule ^model/([^/.]+)/?$ /model/index.php?u=$1 [l,nc,qsa] rewriterule ^collections/([^/.]+)/?$ /collections/index.php?c=$1 [l,nc,qsa] rewriterule ^general/([^/.]+)/?$ /general/index.php?p=$1 [l,nc,qsa] rewriterule ^blog/archive/ /blog/archive/index.php [l,nc,qsa] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^blog/([^/.]+)/?$ /blog/index.php?e=$1 [l,nc,qsa]
however if /blog/archive/
real directory don't need rewrite rule if add line on top of .htaccess:
directoryindex index.php
this load index.php
default directory.