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