Merge branch 'archive' into dev
[dylansserver.git] / .htaccess
index 44ef5b9..f2421fc 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -1,7 +1,18 @@
 ErrorDocument 404 /404.php
+
+
 RewriteEngine on
-RewriteRule ^notes/?$ /index.php?page=1 [L]
-RewriteRule ^notes/page/([1-9]+)/?$ /index.php?page=$1 [L]
-RewriteRule ^notes/([^/\.]+)/?$ /index.php?note=$1 [L]
-RewriteRule ^notes/?$ notes/ [L]
+
+RewriteRule ^note/([^/\.]+)?/?$ /index.php?note=$1 [L]
+
+RewriteRule ^notes/?$ notes/page/1
+RewriteRule ^notes/page/?$ notes/page/1
+RewriteRule ^notes/page/([0-9]+)/?$ /index.php?page=$1 [L]
+
+RewriteRule ^notes/([0-9]{4})/?$ /index.php?year=$1 [L]
+RewriteRule ^notes/([0-9]{4})/([0-9]{2})/?$ /index.php?year=$1&month=$2 [L]
+RewriteRule ^notes/([0-9]{4})/([0-9]{2})/([0-9]{2})/?$ /index.php?year=$1&month=$2&day=$3 [L]
+
+## This needs to be last as to avoid catching /notes/ etc.
 RewriteRule ^([^/\.]+)/?$ /index.php?project=$1 [L]
+