root/releases/0.671/htaccess-dist

Revision 707, 5.3 kB (checked in by sven, 2 years ago)

hide htaccess-dist, to expose less information about exactly what version of elgg is running.

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