# Open Source Social Network
# @package .htaccess.ossn
# @author OSSN Core Team <info@opensource-socialnetwork.org>
# @copyright (c) Engr. Syed Arsalan Hussain Shah (OpenTeknik LLC)
# @license OPEN SOURCE SOCIAL NETWORK LICENSE https://opensource-socialnetwork.org/licence
# @link https://www.opensource-socialnetwork.org
Options +SymlinksIfOwnerMatch
<FilesMatch "(nginx|htaccess).dist">
#Disallow CLI and CRON script from browser
RedirectMatch 404 ^/system/handlers/cli$
RedirectMatch 404 ^/system/handlers/cron$
AddType image/vnd.microsoft.icon .ico
ExpiresDefault "access plus 1 year"
<FilesMatch "\.(jpg|jpeg|gif|png|mp3|flv|mov|avi|3pg|html|htm|swf|js|css|ico)$">
#SetEnv HTTP_MOD_REWRITE 1
RewriteRule ^rewrite.php$ installation/tests/apache_rewrite.php [L]
RewriteRule ^action\/([A-Za-z0-9\_\-\/]+)$ system/handlers/actions.php?action=$1&%{QUERY_STRING} [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([A-Za-z0-9\_\-]+)$ index.php?h=$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([A-Za-z0-9\_\-]+)\/(.*)$ index.php?h=$1&p=$2 [QSA,L]
#https://github.com/nextcloud/server/issues/26569
php_value memory_limit 512M
php_value register_globals 0
php_value post_max_size 105M
php_value upload_max_filesize 100M
php_value default_charset "UTF-8"
php_flag session.cookie_httponly on