source: trunk/www/htaccess.sample @ 1184

Revision 1164, 1.3 KB checked in by bogdan2412, 4 months ago (diff)

Make infoarena compatible with HPHP.

  • Implemented APC caching support since eaccelerator is not compatible with HPHP and although we support memcached, we do not use it on live.
  • Replaced instances of create_function_cached with php anonymous functions. This bumps the PHP version requirement to 5.3, but it allows the code to work with HPHP, since dynamic function generation is replaced with staticly analyzable functions. This also removes a horrible, terrible hack in Textile.php which was storing the current instance of the Textile class being processed as a static variable so that it could be accessed by anonymous functions.
  • Replaced occurrences of assert with log_assert.
  • When running under HPHP, IA_HPHP_ENV is defined and is used to bypass some incompatible code (redundant ini configuration checks).
  • Fixed some includes that were dependent on the working directory being www/
  • Included a sample HPHP configuration file and a Makefile with compilation commands.

REVIEW URL: http://reviewboard.infoarena.ro/r/182/

  • Property svn:eol-style set to native
Line 
1RewriteEngine On
2
3# Same as IA_URL_PREFIX
4# Slashes at both ends
5RewriteBase --write-me-IA_URL_PREFIX--
6
7RewriteCond %{REQUEST_URI}  !^.*/index\.php$
8RewriteCond %{REQUEST_URI}  !^.*/static/.*$
9RewriteCond %{REQUEST_URI}  !^.*/forum/.*$
10RewriteCond %{REQUEST_URI}  !^.*/robots\.txt$
11RewriteCond %{REQUEST_URI}  !^.*/favicon\.ico$
12RewriteCond %{REQUEST_URI}  !^.*/stiri/.*$
13RewriteCond %{REQUEST_URI}  !^.*/news_feed$
14RewriteCond %{REQUEST_URI}  !^.*/avatar/.*$
15RewriteRule ^(.*) index.php?page=$1 [QSA]
16
17RewriteRule ^avatar/(tiny|small|normal|forum|big|full)/(.+)$ static/images/avatar/$1/a$2
18RewriteCond %{REQUEST_FILENAME} !-f
19RewriteCond %{REQUEST_FILENAME} !-d
20RewriteRule ^static/images/avatar/(tiny|small|normal|forum|big|full)/(.+)$ static/images/avatar/$1/noimage
21
22RewriteRule ^stiri/(.*)$ blog/$1 [R=301,QSA]
23RewriteRule ^news_feed$ blog?action=rss [R=301,QSA]
24
25php_value magic_quotes_gpc 0
26php_value register_globals 0
27php_value session.use_only_cookies 1
28
29# Error reporting. Everything is logged, but only in the web server log.
30php_value error_reporting 65535
31
32# FIXME: change for production environment.
33php_value display_errors true
34php_value log_errors true
35php_value html_errors false
36php_value memory_limit "64M"
37php_value post_max_size "65M"
38php_value upload_max_filesize "64M"
Note: See TracBrowser for help on using the repository browser.