![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/domains/brickabois.com/public_html/ |
# Free Village Network - Apache Configuration
# Enable Rewrite Engine
RewriteEngine On
# Set index.php as default
DirectoryIndex index.php index.html
# Force HTTPS
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Pretty URLs - Rewrite for main pages
# More specific rules first, then general ones
# Village sub-pages (must come before general /land rule)
RewriteRule ^villages/join/?$ villages/join.php [L,QSA]
RewriteRule ^villages/village/([a-zA-Z0-9_-]+)/?$ villages/village.php?slug=$1 [L,QSA]
RewriteRule ^land/join/?$ villages/join.php [L,QSA]
RewriteRule ^land/village/([a-zA-Z0-9_-]+)/?$ villages/village.php?slug=$1 [L,QSA]
# Main pages
RewriteRule ^commons/?$ commons.php [L,QSA]
RewriteRule ^ledger/?$ ledger.php [L,QSA]
RewriteRule ^ledger/create/?$ ledger/create.php [L,QSA]
# Land page - rewrite to lands.php file
RewriteRule ^land$ lands.php [L,QSA]
RewriteRule ^land/$ lands.php [L,QSA]
RewriteRule ^maps/?$ maps.php [L,QSA]
RewriteRule ^city/?$ city.php [L,QSA]
RewriteRule ^login/?$ login.php [L,QSA]
RewriteRule ^register/?$ register.php [L,QSA]
RewriteRule ^logout/?$ logout.php [L,QSA]
RewriteRule ^dashboard/?$ dashboard.php [L,QSA]
RewriteRule ^profile/?$ profile.php [L,QSA]
RewriteRule ^post/?$ post.php [L,QSA]
# Ledger pages
RewriteRule ^ledger/proposal/([0-9]+)/?$ ledger/proposal.php?id=$1 [L,QSA]
# API endpoints
RewriteRule ^api/?$ api/index.php [L]
RewriteRule ^api/([a-zA-Z0-9_]+)/?$ api/index.php?endpoint=$1 [L,QSA]
RewriteRule ^api/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/?$ api/index.php?endpoint=$1&action=$2 [L,QSA]
RewriteRule ^api/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/?$ api/index.php?endpoint=$1&action=$2&id=$3 [L,QSA]
# Security Headers
<IfModule mod_headers.c>
Header set X-Content-Type-Options "nosniff"
Header set X-Frame-Options "SAMEORIGIN"
Header set X-XSS-Protection "1; mode=block"
Header set Referrer-Policy "strict-origin-when-cross-origin"
</IfModule>
# Prevent access to sensitive files
<FilesMatch "^(config\.php|\.env|\.git|database_schema\.sql)$">
Order allow,deny
Deny from all
</FilesMatch>
# Prevent directory listing
Options -Indexes
# Custom Error Pages
ErrorDocument 404 /404.php
ErrorDocument 500 /500.php
# PHP Settings
<IfModule mod_php7.c>
php_value upload_max_filesize 10M
php_value post_max_size 10M
php_value max_execution_time 300
php_value max_input_time 300
</IfModule>
# Gzip Compression
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/json
</IfModule>
# Browser Caching
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
</IfModule>