aboutsummaryrefslogtreecommitdiff
path: root/htaccess_dist
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-10 22:03:20 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-10 22:03:20 +0000
commit4361dc15a79480675b055d6c3baad593adb8343b (patch)
treea17ee49753b1096f45fde9663341ed8f920b47c5 /htaccess_dist
parent9925507bbe4465772e246daa24009e463422211b (diff)
downloadelgg-4361dc15a79480675b055d6c3baad593adb8343b.tar.gz
elgg-4361dc15a79480675b055d6c3baad593adb8343b.tar.bz2
Refs #2228: Deprecated use of pg/ in page handlers. Now we get to have nice clean urls like "example.com/bookmarks"
git-svn-id: http://code.elgg.org/elgg/trunk@8651 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'htaccess_dist')
-rw-r--r--htaccess_dist20
1 files changed, 16 insertions, 4 deletions
diff --git a/htaccess_dist b/htaccess_dist
index 4508c539b..c2f144575 100644
--- a/htaccess_dist
+++ b/htaccess_dist
@@ -97,10 +97,13 @@ RewriteEngine on
#
#RewriteBase /
-RewriteRule ^action\/([A-Za-z0-9\_\-\/]+)$ engine/handlers/action_handler.php?action=$1&%{QUERY_STRING}
-
-RewriteRule ^pg\/([A-Za-z0-9\_\-]+)\/(.*)$ engine/handlers/page_handler.php?handler=$1&page=$2&%{QUERY_STRING}
+# In for backwards compatibility
RewriteRule ^pg\/([A-Za-z0-9\_\-]+)$ engine/handlers/page_handler.php?handler=$1&%{QUERY_STRING}
+RewriteRule ^pg\/([A-Za-z0-9\_\-]+)\/(.*)$ engine/handlers/page_handler.php?handler=$1&page=$2&%{QUERY_STRING}
+RewriteRule ^tag\/(.+)\/?$ engine/handlers/page_handler.php?handler=search&page=$1
+
+
+RewriteRule ^action\/([A-Za-z0-9\_\-\/]+)$ engine/handlers/action_handler.php?action=$1&%{QUERY_STRING}
RewriteRule ^cache\/(.*)$ engine/handlers/cache_handler.php?request=$1&%{QUERY_STRING}
@@ -112,9 +115,18 @@ RewriteRule ^export\/([A-Za-z]+)\/([0-9]+)\/([A-Za-z]+)\/([A-Za-z0-9\_]+)\/$ eng
RewriteRule xml-rpc.php engine/handlers/xml-rpc_handler.php
RewriteRule mt/mt-xmlrpc.cgi engine/handlers/xml-rpc_handler.php
-RewriteRule ^tag/(.+)/?$ engine/handlers/page_handler.php?handler=search&page=$1
# rule for rewrite module test during install - can be removed after installation
RewriteRule ^rewrite.php$ install.php
+# Everything else that isn't a file gets routed through the page handler
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteRule ^([A-Za-z0-9\_\-]+)$ engine/handlers/page_handler.php?handler=$1 [QSA]
+
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteRule ^([A-Za-z0-9\_\-]+)\/(.*)$ engine/handlers/page_handler.php?handler=$1&page=$2 [QSA]
+
+
</IfModule>