root/releases/0.672/htaccess-dist

Revision 748, 5.5 kB (checked in by sven, 2 years ago)

add example php memory limit adjustment to htaccess

  • 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 # PHP defaults to allowing file uploads of max 2MB, below is example option for 5MB.
16 # NB: Adjusting value may not work, depending on other configured php and apache limits
17 #php_value upload_max_filesize 5242880
18
19 # Elgg can be more of a RAM lover than PHP's default of 8 meg. E.g. 16 meg:
20 #php_value memory_limit 16777216
21
22 # Not really necessary, just to be clean
23 #php_flag short_open_tag off
24 # Forgot that anyone might still have this turned on
25 #php_flag register_globals off
26
27 <IfModule mod_rewrite.c>
28
29 RewriteEngine on
30
31 # If Elgg is in a subdirectory on your site, you might need to add a RewriteBase line
32 # containing the path from your site root to elgg's root. e.g. If your site is
33 # http://example.com/ and Elgg is in http://example.com/sites/elgg/, you might need
34 #
35 #RewriteBase /sites/elgg/
36 #
37 # here, only without the # in front.
38 #
39 # If you're not running Elgg in a subdirectory on your site, but still getting lots
40 # of 404 errors beyond the front page, you could instead try:
41 #
42 #RewriteBase /
43
44 RewriteRule ^([0-9\-]+)\.css$ _templates/css.php?template=$1
45
46 RewriteRule ^(.+)\/rssstyles.xsl$ _rss/styles.php?rssurl=$1&url=$1
47
48 RewriteRule ^([A-Za-z0-9]+)\/dashboard(\/)?$ mod/adash/index.php?user=$1
49
50 RewriteRule ^([A-Za-z0-9]+)(\/)?$ profile/index.php?profile_name=$1
51 RewriteRule ^([A-Za-z0-9]+)\/profile(\/)?$ profile/index.php?profile_name=$1
52 RewriteRule ^([A-Za-z0-9]+)\/tags(\/)?$ search/personaltags.php?profile_name=$1
53 RewriteRule ^(([A-Za-z0-9])[A-Za-z0-9]+)\/rss\/?$ _rss/static.php?username=$1&userref=$2&type=profile
54 RewriteRule ^([A-Za-z0-9]+)\/rss\/(.+)\/?$ profile/rss2.php?profile_name=$1&tag=$2
55
56 RewriteRule ^([A-Za-z0-9]+)\/newsclient\/?$ _rss/subscriptions.php?profile_name=$1
57 RewriteRule ^([A-Za-z0-9]+)\/newsclient\/all\/?$ _rss/index.php?profile_name=$1
58 RewriteRule ^([A-Za-z0-9]+)\/newsclient\/all\/skip=([0-9]+)$ _rss/index.php?profile_name=$1&feed_offset=$2
59
60 RewriteRule ^([A-Za-z0-9]+)\/feeds\/?$ _rss/subscriptions.php?profile_name=$1
61 RewriteRule ^([A-Za-z0-9]+)\/feeds\/all\/?$ _rss/index.php?profile_name=$1
62 RewriteRule ^([A-Za-z0-9]+)\/feeds\/all\/skip=([0-9]+)$ _rss/index.php?profile_name=$1&feed_offset=$2
63
64 RewriteRule ^([A-Za-z0-9]+)\/weblog\/?$ _weblog/index.php?weblog_name=$1
65 ReWriteRule ^([A-Za-z0-9]+)\/weblog\/skip=([0-9]+)$ _weblog/index.php?weblog_name=$1&weblog_offset=$2
66 RewriteRule ^([A-Za-z0-9]+)\/weblog\/category\/([^\/]+)\/?$ _weblog/index.php?weblog_name=$1&filter=$2
67 ReWriteRule ^([A-Za-z0-9]+)\/weblog\/category\/([^\/]+)\/skip=([0-9]+)$ _weblog/index.php?weblog_name=$1&filter=$2&weblog_offset=$3
68 RewriteRule ^([A-Za-z0-9]+)\/weblog\/archive\/?$ _weblog/archive.php?weblog_name=$1
69 RewriteRule ^([A-Za-z0-9]+)\/weblog\/archive\/([0-9]+)\/([0-9]+)\/?$ _weblog/archive_month.php?weblog_name=$1&year=$2&month=$3
70 RewriteRule ^([A-Za-z0-9]+)\/weblog\/friends\/?$ _weblog/friends.php?weblog_name=$1
71 ReWriteRule ^([A-Za-z0-9]+)\/weblog\/friends\/skip=([0-9]+)$ _weblog/friends.php?weblog_name=$1&weblog_offset=$2
72 RewriteRule ^([A-Za-z0-9]+)\/weblog\/interesting\/?$ _weblog/interesting.php?weblog_name=$1
73 ReWriteRule ^([A-Za-z0-9]+)\/weblog\/interesting\/skip=([0-9]+)$ _weblog/interesting.php?weblog_name=$1&weblog_offset=$2
74 RewriteRule ^(([A-Za-z0-9])[A-Za-z0-9]+)\/weblog\/rss\/?$ _rss/static.php?username=$1&userref=$2&type=weblog
75 RewriteRule ^([A-Za-z0-9]+)\/weblog\/rss\/(.+)\/?$ _weblog/rss2.php?weblog_name=$1&tag=$2&modifier=is
76 RewriteRule ^([A-Za-z0-9]+)\/weblog\/rssnot\/(.+)\/?$ _weblog/rss2.php?weblog_name=$1&tag=$2&modifier=not
77 RewriteRule ^[A-Za-z0-9]+\/weblog\/([0-9]+)\.html$ _weblog/view_post.php?post=$1
78 RewriteRule ^[A-Za-z0-9]+\/weblog\/([0-9]+)\.html.([0-9]+)$ _weblog/view_post.php?post=$1&commentpage=$2
79
80 RewriteRule ^tag\/(.+)\/?$ search/all.php?tag=$1
81 RewriteRule ^rsstag\/(.+)\/?$ search/rss.php?tag=$1
82 RewriteRule ^tag\/(.+)/ecl\/?$ search/ecl.php?tag=$1
83
84 RewriteRule ^([A-Za-z0-9]+)\/friends\/?$ _friends/index.php?friends_name=$1
85 RewriteRule ^([A-Za-z0-9]+)\/foaf\/?$ _friends/foaf.php?friends_name=$1
86
87 RewriteRule ^([A-Za-z0-9]+)\/communities\/?$ _communities/index.php?friends_name=$1
88 RewriteRule ^community\/([0-9]+)\/?$ _communities/community.php?community_id=$1
89
90 RewriteRule ^([A-Za-z0-9]+)\/files\/?$ _files/index.php?files_name=$1
91 RewriteRule ^([A-Za-z0-9]+)\/files\/([0-9]+)\/?$ _files/index.php?files_name=$1&folder=$2
92 RewriteRule ^([A-Za-z0-9]+)\/files\/([0-9\-]+)\/([0-9]+)\/(.+)$ _files/download.php?files_name=$1&folder=$2&filename=$4&id=$3
93 RewriteRule ^(([A-Za-z0-9])[A-Za-z0-9]+)\/files\/rss\/?$ _rss/static.php?username=$1&userref=$2&type=files
94 RewriteRule ^([A-Za-z0-9]+)\/files\/rss\/(.+)\/?$ _files/rss2.php?files_name=$1&tag=$2
95
96 RewriteRule ^_icon\/user/([-0-9]+)$ _icons/icon.php?id=$1
97 RewriteRule ^_icon\/user/([-0-9]+)\/([A-Za-z])\/([0-9]+)$ _icons/icon.php?id=$1&constraint1=$2&size1=$3
98 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
99 RewriteRule ^_icon\/file/([-0-9]+)$ _files/icon.php?id=$1
100
101 # Some blogging clients probe Wordpress or MoveableType endpoints,
102 # redirect them to the Elgg xml-rpc endpoint
103 #
104 RewriteRule xml-rpc.php _rpc/RPC2.php
105 RewriteRule mt/mt-xmlrpc.cgi _rpc/RPC2.php
106
107 </IfModule>
Note: See TracBrowser for help on using the browser.