root/releases/elgg0.8rc2/htaccess-dist

Revision 1080, 7.3 kB (checked in by ben, 1 year ago)

Integrating Diego Ramirez's work to migrate the communities code into /mod/community.

  • Property svn:eol-style set to native
Line 
1 <IfModule !mod_rewrite.c>
2     # ugly ugly hack to detect missing mod_rewrite
3     # RedirectMatch must be to an absolute destination, so forces 500 error...
4     ErrorDocument 500 "Elgg error: Apache does not have mod_rewrite loaded. Please check your apache setup."
5     RedirectMatch 302 .* index.php
6 </IfModule>
7
8 <Files "htaccess-dist">
9     order allow,deny
10     deny from all
11 </Files>
12
13 Options +FollowSymLinks
14
15 # Whether to display PHP error messages in page output. Recommended to be off for production systems.
16 # Messages will be logged to Apache's error log regardless.
17 #php_flag display_errors on
18
19 # PHP defaults to allowing file uploads of max 2MB, below is example option for 5MB.
20 # NB: Adjusting value may not work, depending on other configured php and apache limits.
21 # for more info see http://php.net/manual/en/features.file-upload.php and http://httpd.apache.org/docs/2.0/mod/core.html#limitrequestbody
22 # post_max_size should be slightly larger than upload_max_filesize, but the default is usually 8MB anyway.
23 #php_value post_max_size 8388608
24 #php_value upload_max_filesize 5242880
25
26 # Elgg can be more of a RAM lover than PHP's default of 8 meg. E.g. 16 meg:
27 php_value memory_limit 16777216
28
29 # Not really necessary, just to be clean
30 #php_flag short_open_tag off
31 # Forgot that anyone might still have this turned on
32 #php_flag register_globals off
33
34 <IfModule mod_rewrite.c>
35
36 RewriteEngine on
37
38 # If Elgg is in a subdirectory on your site, you might need to add a RewriteBase line
39 # containing the path from your site root to elgg's root. e.g. If your site is
40 # http://example.com/ and Elgg is in http://example.com/sites/elgg/, you might need
41 #
42 #RewriteBase /sites/elgg/
43 #
44 # here, only without the # in front.
45 #
46 # If you're not running Elgg in a subdirectory on your site, but still getting lots
47 # of 404 errors beyond the front page, you could instead try:
48 #
49 #RewriteBase /
50
51 RewriteRule ^_templates/css/(.+)$ _templates/css.php?template=$1
52
53 RewriteRule ^(.+)\/rssstyles.xsl$ _rss/styles.php?rssurl=$1&url=$1
54
55 RewriteRule ^([A-Za-z0-9]+)\/dashboard(\/)?$ mod/adash/index.php?user=$1
56
57 RewriteRule ^([A-Za-z0-9]+)(\/)?$ profile/index.php?profile_name=$1
58 RewriteRule ^([A-Za-z0-9]+)\/profile(\/)?$ profile/index.php?profile_name=$1
59 RewriteRule ^([A-Za-z0-9]+)\/tags(\/)?$ search/personaltags.php?profile_name=$1
60 RewriteRule ^(([A-Za-z0-9])[A-Za-z0-9]+)\/rss\/?$ _rss/static.php?username=$1&userref=$2&type=profile
61 RewriteRule ^([A-Za-z0-9]+)\/rss\/(.+)\/?$ profile/rss2.php?profile_name=$1&tag=$2
62
63 RewriteRule ^([A-Za-z0-9]+)\/newsclient\/?$ _rss/subscriptions.php?profile_name=$1
64 RewriteRule ^([A-Za-z0-9]+)\/newsclient\/all\/?$ _rss/index.php?profile_name=$1
65 RewriteRule ^([A-Za-z0-9]+)\/newsclient\/all\/skip=([0-9]+)$ _rss/index.php?profile_name=$1&feed_offset=$2
66
67 RewriteRule ^([A-Za-z0-9]+)\/feeds\/?$ _rss/subscriptions.php?profile_name=$1
68 RewriteRule ^([A-Za-z0-9]+)\/feeds\/all\/?$ _rss/index.php?profile_name=$1
69 RewriteRule ^([A-Za-z0-9]+)\/feeds\/all\/skip=([0-9]+)$ _rss/index.php?profile_name=$1&feed_offset=$2
70
71
72 RewriteRule ^([A-Za-z0-9]+)\/weblog\/?$ mod/blog/index.php?weblog_name=$1
73 ReWriteRule ^([A-Za-z0-9]+)\/weblog\/skip=([0-9]+)$ mod/blog/index.php?weblog_name=$1&weblog_offset=$2
74 RewriteRule ^([A-Za-z0-9]+)\/weblog\/edit$ mod/blog/edit.php?profile_name=$1
75 RewriteRule ^([A-Za-z0-9]+)\/weblog\/edit\/([0-9]+)$ mod/blog/edit.php?profile_name=$1&weblog_post_id=$2&action=edit
76 RewriteRule ^([A-Za-z0-9]+)\/weblog\/archive\/?$ mod/blog/archive.php?weblog_name=$1
77 RewriteRule ^([A-Za-z0-9]+)\/weblog\/archive\/([0-9]+)\/([0-9]+)\/?$ mod/blog/archive_month.php?weblog_name=$1&year=$2&month=$3
78 RewriteRule ^([A-Za-z0-9]+)\/weblog\/friends\/?$ mod/blog/friends.php?weblog_name=$1
79 ReWriteRule ^([A-Za-z0-9]+)\/weblog\/friends\/skip=([0-9]+)$ mod/blog/friends.php?weblog_name=$1&weblog_offset=$2
80 RewriteRule ^([A-Za-z0-9]+)\/weblog\/interesting\/?$ mod/blog/interesting.php?weblog_name=$1
81 ReWriteRule ^([A-Za-z0-9]+)\/weblog\/interesting\/skip=([0-9]+)$ mod/blog/interesting.php?weblog_name=$1&weblog_offset=$2
82 RewriteRule ^[A-Za-z0-9]+\/weblog\/([0-9]+)\.html$ mod/blog/view_post.php?post=$1
83 RewriteRule ^[A-Za-z0-9]+\/weblog\/([0-9]+)\.html.([0-9]+)$ mod/log/view_post.php?post=$1&commentpage=$2
84 RewriteRule ^([A-Za-z0-9]+)\/weblog\/rss\/(.+)\/?$ mod/blog/rss2.php?weblog_name=$1&tag=$2&modifier=is
85 RewriteRule ^([A-Za-z0-9]+)\/weblog\/rssnot\/(.+)\/?$ mod/blog/rss2.php?weblog_name=$1&tag=$2&modifier=not
86 RewriteRule ^(([A-Za-z0-9])[A-Za-z0-9]+)\/weblog\/rss\/?$ _rss/static.php?username=$1&userref=$2&type=weblog
87 RewriteRule ^([A-Za-z0-9]+)\/weblog\/category\/([^\/]+)\/?$ mod/blog/index.php?weblog_name=$1&filter=$2
88 ReWriteRule ^([A-Za-z0-9]+)\/weblog\/category\/([^\/]+)\/skip=([0-9]+)$ mod/blog/index.php?weblog_name=$1&filter=$2&weblog_offset=$3
89 ReWriteRule ^weblog\/everyone$ mod/blog/everyone.php
90 ReWriteRule ^weblog\/everyone\/(people|communities|commented|uncommented)$ mod/blog/everyone.php?filter=$1
91 ReWriteRule ^weblog\/everyone\/skip/([0-9]+)$ mod/blog/everyone.php?weblog_offset=$1
92
93 RewriteRule ^tag\/(.+)\/?$ search/all.php?tag=$1
94 RewriteRule ^rsstag\/(.+)\/?$ search/rss.php?tag=$1
95 RewriteRule ^tag\/(.+)/ecl\/?$ search/ecl.php?tag=$1
96
97 RewriteRule ^([A-Za-z0-9]+)\/friends\/?$ _friends/index.php?friends_name=$1
98 RewriteRule ^([A-Za-z0-9]+)\/foaf\/?$ _friends/foaf.php?friends_name=$1
99
100 RewriteRule ^([A-Za-z0-9]+)\/communities\/?$ mod/community/index.php?friends_name=$1
101 RewriteRule ^([A-Za-z0-9]+)\/communities\/owned$ mod/community/owned.php?profile_name=$1
102 RewriteRule ^([A-Za-z0-9]+)\/communities\/new$ mod/community/new.php?profile_name=$1
103 RewriteRule ^([A-Za-z0-9]+)\/community\/delete$ mod/community/index.php?profile_name=$1&action=community:delete
104 RewriteRule ^([A-Za-z0-9]+)\/community\/requests$ mod/community/requests.php?profile_name=$1
105 RewriteRule ^([A-Za-z0-9]+)\/community\/requests\/aprove\/([0-9]+)$ mod/community/requests.php?profile_name=$1&action=community:approve:request&request_id=$2
106 RewriteRule ^([A-Za-z0-9]+)\/community\/requests\/decline\/([0-9]+)$ mod/community/requests.php?profile_name=$1&action=community:decline:request&request_id=$2
107 RewriteRule ^([A-Za-z0-9]+)\/community\/members$ mod/community/members.php?profile_name=$1
108 RewriteRule ^([A-Za-z0-9]+)\/community\/separate\/([0-9]+)$ mod/community/members.php?profile_name=$1&friend_id=$2&action=separate
109 RewriteRule ^community\/([0-9]+)\/?$ mod/communities/community.php?community_id=$1
110
111 RewriteRule ^([A-Za-z0-9]+)\/files\/?$ _files/index.php?files_name=$1
112 RewriteRule ^([A-Za-z0-9]+)\/files\/([0-9]+)\/?$ _files/index.php?files_name=$1&folder=$2
113 RewriteRule ^([A-Za-z0-9]+)\/files\/([0-9\-]+)\/([0-9]+)\/(.+)$ _files/download.php?files_name=$1&folder=$2&filename=$4&id=$3
114 RewriteRule ^(([A-Za-z0-9])[A-Za-z0-9]+)\/files\/rss\/?$ _rss/static.php?username=$1&userref=$2&type=files
115 RewriteRule ^([A-Za-z0-9]+)\/files\/rss\/(.+)\/?$ _files/rss2.php?files_name=$1&tag=$2
116
117 RewriteRule ^_icon\/user/([-0-9]+)$ _icons/icon.php?id=$1
118 RewriteRule ^_icon\/user/([-0-9]+)\/([A-Za-z])\/([0-9]+)$ _icons/icon.php?id=$1&constraint1=$2&size1=$3
119 RewriteRule ^_icon\/user/([-0-9]+)\/([A-Za-z])\/([0-9]+)\/([A-Za-z])\/([0-9]+)$ _icons/icon.php?id=$1&constraint1=$2&size1=$3&constraint2=$4&size2=$5
120 RewriteRule ^_icon\/file/([-0-9]+)$ _files/icon.php?id=$1
121
122 # Some blogging clients probe Wordpress or MoveableType endpoints,
123 # redirect them to the Elgg xml-rpc endpoint
124 #
125 RewriteRule xml-rpc.php _rpc/RPC2.php
126 RewriteRule mt/mt-xmlrpc.cgi _rpc/RPC2.php
127
128 </IfModule>
Note: See TracBrowser for help on using the browser.