-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.htaccess
More file actions
40 lines (34 loc) · 1.84 KB
/
Copy path.htaccess
File metadata and controls
40 lines (34 loc) · 1.84 KB
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
<IfModule mod_rewrite.c>
RewriteEngine On
# CRITICAL: Serve PHP files directly - don't route to React
RewriteCond %{REQUEST_URI} \.php$ [NC]
RewriteRule . - [L]
# Bot detection for event link previews - MUST BE BEFORE React routing
# Route bots accessing /event/EVT-XXXX to PHP handler
RewriteCond %{HTTP_USER_AGENT} (bot|crawler|spider|scraper|facebookexternalhit|facebookcatalog|Twitterbot|Twitter|LinkedInBot|LinkedIn|WhatsApp|whatsapp|Slackbot|Slack|TelegramBot|Telegram|SkypeUriPreview|Discordbot|Discord|Googlebot|Google|Bingbot|Bing|Slurp|DuckDuckBot|Baiduspider|YandexBot|Sogou|Exabot|facebot|ia_archiver|Pinterestbot|Pinterest|redditbot|reddit|Applebot|Line|Kik|Viber|WeChat|Snapchat|TikTok|PostmanRuntime|curl|wget|linkedin) [NC]
RewriteRule ^event/(.+)$ /event-preview.php?id=$1 [L,QSA]
# Skip rewriting for index.html
RewriteRule ^index\.html$ - [L]
# For regular users, serve React app (standard SPA routing)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule . /index.html [L]
</IfModule>
# php -- BEGIN cPanel-generated handler, do not edit
# Set the "ea-php81" package as the default "PHP" programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php81 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
# Cache control for static assets
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/png "access plus 30 days"
ExpiresByType image/jpg "access plus 30 days"
ExpiresByType image/jpeg "access plus 30 days"
ExpiresByType image/gif "access plus 30 days"
ExpiresByType image/svg+xml "access plus 30 days"
ExpiresByType text/css "access plus 30 days"
ExpiresByType application/javascript "access plus 30 days"
</IfModule>