-
Notifications
You must be signed in to change notification settings - Fork 972
/
.htaccess
479 lines (394 loc) · 25.2 KB
/
.htaccess
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
# BEGIN Expires Don't forget to enable mod_headers and mod_expires, you can do so by running a2enmod rewrite and a2enmod headers
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType image/gif "access plus 2592000 seconds"
ExpiresByType image/jpeg "access plus 2592000 seconds"
ExpiresByType image/png "access plus 2592000 seconds"
ExpiresByType image/webp "access plus 2592000 seconds"
ExpiresByType text/css "access plus 604800 seconds"
ExpiresByType text/javascript "access plus 216000 seconds"
ExpiresByType application/x-javascript "access plus 216000 seconds"
</ifModule>
<Files routes.php>
<IfModule !authz_core_module>
Order Allow,Deny
Deny from all
</IfModule>
<IfModule authz_core_module>
Require all denied
</IfModule>
</Files>
<Files PayPal.log>
<IfModule !authz_core_module>
Order Allow,Deny
Deny from all
</IfModule>
<IfModule authz_core_module>
Require all denied
</IfModule>
</Files>
<Files avideo.log>
<IfModule !authz_core_module>
Order Allow,Deny
Deny from all
</IfModule>
<IfModule authz_core_module>
Require all denied
</IfModule>
</Files>
<Files avideo.js.log>
<IfModule !authz_core_module>
Order Allow,Deny
Deny from all
</IfModule>
<IfModule authz_core_module>
Require all denied
</IfModule>
</Files>
# Disable directory browsing
Options All -Indexes
# END Expires
# BEGIN Caching
<IfModule mod_headers.c>
# Set Access-Control-Allow-Origin for multiple file types
<FilesMatch "\.(php|ico|pdf|flv|jpg|jpeg|png|gif|swf|ts|webp|mp3|mp4|woff2|css|html|htm|key|m3u8)$">
Header setifempty Access-Control-Allow-Origin "*"
</FilesMatch>
# Cache settings based on file types
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf|ts|webp|mp3|mp4)$">
Header set Cache-Control "max-age=2592000, public"
</FilesMatch>
<FilesMatch "\.(woff2|css)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>
<FilesMatch "\.(js)$">
Header set Cache-Control "max-age=216000, public"
</FilesMatch>
<FilesMatch "\.(xml|txt)$">
Header set Cache-Control "max-age=216000, public, must-revalidate"
</FilesMatch>
<FilesMatch "\.(html|htm|php|key|m3u8)$">
Header set Cache-Control "max-age=1, private, must-revalidate"
</FilesMatch>
</IfModule>
# END Caching
<IfModule mod_rewrite.c>
RewriteCond %{HTTPS} =on
RewriteRule ^(.*)$ - [env=proto:https]
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ - [env=proto:http]
RewriteEngine on
#VideoHLS for DRM
RewriteRule ^buy/? plugin/YPTWallet/buy.php [NC,L,QSA]
RewriteRule ^id/? view/id.php [NC,L,QSA]
RewriteRule ^logo.png view/logo.png.php [NC,L,QSA]
RewriteRule glyphicons-halflings-regular(.+)$ view/bootstrap/fonts/glyphicons-halflings-regular$1 [NC,L]
RedirectMatch 404 /\.git
RewriteRule ^offline/([0-9]+)/? view/offline.php?videos_id=$1 [NC,L,QSA]
RewriteRule ^offline/? view/offline.php [NC,L,QSA]
#Compatibility
RewriteRule ^view/js/jquery-3.5.1.min.js node_modules/jquery/dist/jquery.min.js
RewriteRule ^view/js/seetalert/sweetalert.min.js node_modules/sweetalert/dist/sweetalert.min.js
RewriteRule ^view/js/jquery-ui/(.*) node_modules/jquery-ui-dist/$1
RewriteRule ^videos/webfonts/(fa-.*) view/css/fontawesome-free-5.5.0-web/webfonts/$1 [NC,L]
RewriteRule ^playLink/?$ view/modePlayLink.php [QSA]
RewriteRule ^videos/([^/]+)/(.*).key$ plugin/VideoHLS/downloadProtection.php?filename=$1&key=$2 [QSA]
RewriteRule ^meet/([0-9]+)/(.+)$ plugin/Meet/iframe.php?meet_schedule_id=$1&roomName=$2 [NC,L,QSA]
RewriteRule ^meet/([0-9]+)$ plugin/Meet/iframe.php?meet_schedule_id=$1 [NC,L,QSA]
RewriteRule ^live/([0-9]+)/([^/]+)/([^/]+)/ls/([0-9]+)/?$ plugin/Live/?live_servers_id=$1&c=$2&live_index=$3&live_schedule=$4 [NC,L,QSA]
RewriteRule ^live/([0-9]+)/([^/]+)/ls/([0-9]+)/?$ plugin/Live/?live_servers_id=$1&c=$2&live_schedule=$3 [NC,L,QSA]
RewriteRule ^live/([0-9]+)/(.+)/(.+)$ plugin/Live/?live_servers_id=$1&c=$2&live_index=$3 [NC,L,QSA]
RewriteRule ^live/([0-9]+)/(.+)$ plugin/Live/?live_servers_id=$1&c=$2 [NC,L,QSA]
RewriteRule ^live/?$ plugin/Gallery/view/mainAreaLive.php [NC,L,QSA]
RewriteRule ^liveLink/([0-9]+).*$ plugin/LiveLinks/view/Live.php?link=$1 [NC,L,QSA]
RewriteRule ^liveLinkEmbed/([0-9]+).*$ plugin/LiveLinks/view/Live.php?link=$1&embed=1 [NC,L,QSA]
RewriteRule ^liveNow/?.*$ plugin/Live/latestOrLive.php [NC,L,QSA]
RewriteRule ^channel/([^/]+)/liveNow/?.*$ plugin/Live/latestOrLive.php?channelName=$1 [NC,L,QSA]
RewriteRule ^cat/([^/]+)/liveNow/?.*$ plugin/Live/latestOrLive.php?catName=$1 [NC,L,QSA]
#main Files
RewriteRule ^index.php$ view/index.php [NC,L,QSA]
RewriteRule ^site/?$ view/index_firstPage.php [NC,L,QSA]
RewriteRule ^index.html$ %{ENV:proto}://%{HTTP_HOST} [L,R=301,NE]
RewriteRule ^index.htm$ %{ENV:proto}://%{HTTP_HOST} [L,R=301,NE]
#RewriteRule ^index.php$ /view/index.php [NC,L]
#RewriteRule ^$ view/ [NC,L]
RewriteRule ^bootstrap/(.+)$ view/bootstrap/$1 [NC,L]
RewriteRule ^oembed/?(.+)$ view/oembed.php$1 [NC,L]
RewriteRule ^js/(.+)$ view/js/$1 [NC,L]
RewriteRule ^css/(.+)$ view/css/$1 [NC,L]
RewriteRule ^img/(.+)$ view/img/$1 [NC,L]
RewriteRule ^i/(.+)$ view/iframe.php?type=$1 [NC,L,QSA]
RewriteRule ^videos/fonts/(.+)$ view/bootstrap/fonts/$1 [NC,L]
RewriteRule ^page/([0-9]+)/?$ view/?page=$1 [QSA]
RewriteRule ^videoOnly/?$ view/?type=video [NC,L]
RewriteRule ^audioOnly/?$ view/?type=audio [NC,L]
RewriteRule ^download$ view/downloadExternalVideo.php [NC,L]
RewriteRule ^info$ view/info.php [QSA,L]
RewriteRule ^version$ view/info.php?version=1 [NC,L]
RewriteRule ^downloadNow$ objects/downloadVideo.php [NC,L]
RewriteRule ^getDownloadProgress$ objects/downloadVideoProgress.php [NC,L]
RewriteRule ^status$ objects/status.json.php [NC,L]
RewriteRule ^menu/([^!#$&'()*+,\/:;=?@[\]]+)/? plugin/TopMenu/seo.php?menuSeoUrlItem=$1 [QSA,L]
RewriteRule ^admin/plugin/(.+)$ plugin/$1 [NC,L]
RewriteRule ^trending/?$ view/trending.php [NC,L,QSA]
RewriteRule ^about$ view/about.php [NC,L]
RewriteRule ^contact$ view/contact.php [NC,L]
RewriteRule ^sendEmail$ objects/sendEmail.json.php [NC,L]
RewriteRule ^captcha$ objects/getCaptcha.php [NC,L]
RewriteRule ^monitor/(.+)$ objects/ServerMonitor/$1 [NC,L]
RewriteRule ^videosList$ view/videosList.php [NC,L]
RewriteRule ^videosList/video/([^!#$&'()*,\/:;=?@[\]]+)/page/([0-9]+)/?$ view/videosList.php?videoName=$1&page=$2 [QSA]
RewriteRule ^videosList/cat/([^!#$&'()*,\/:;=?@[\]]+)/video/([^!#$&'()*+,\/:;=?@[\]]+)/page/([0-9]+)/?$ view/videosList.php?catName=$1&videoName=$2&page=$3 [QSA]
#for the category name
RewriteRule ^cat/([^!#$&'()*+,\/:;=?@[\]]+)/?$ view/?catName=$1 [NC,L,QSA]
RewriteRule ^cat/([^!#$&'()*+,\/:;=?@[\]]+)/page/([0-9]+)/?$ view/?catName=$1&page=$2 [NC,L,QSA]
RewriteRule ^c/([0-9]+)/([^/]+)? view/?catId=$1&catName=$2 [QSA]
RewriteRule ^tag/([0-9-]+)(.*)?$ view/?tags_id=$1 [NC,L,QSA]
# Video URLs with optional title or trailing slash
RewriteRule ^channel/([^/]+)/video/([0-9a-zA-Z_.-]+)(/.*|)$ view/modeYoutube.php?videos_id=$2&channelName=$1 [L,QSA,NC]
# Audio Embed URLs with optional title or trailing slash
RewriteRule ^channel/([^/]+)/audioEmbed/([0-9a-zA-Z_.-]+)(/.*|)$ view/videoEmbeded.php?videos_id=$2&channelName=$1&includeType=audio [L,QSA,NC]
# Audio URLs with optional title or trailing slash
RewriteRule ^channel/([^/]+)/audio/([0-9a-zA-Z_.-]+)(/.*|)$ view/modeYoutube.php?videos_id=$2&channelName=$1&includeType=audio [L,QSA,NC]
# Video Embed URLs with optional title or trailing slash
RewriteRule ^channel/([^/]+)/videoEmbed/([0-9a-zA-Z_.-]+)(/.*|)$ view/videoEmbeded.php?videos_id=$2&channelName=$1 [L,QSA,NC]
# Article URLs with optional title or trailing slash
RewriteRule ^channel/([^/]+)/article/([0-9a-zA-Z_.-]+)(/.*|)$ view/modeYoutube.php?videos_id=$2&channelName=$1 [L,QSA,NC]
# Article Embed URLs with optional title or trailing slash
RewriteRule ^channel/([^/]+)/articleEmbed/([0-9a-zA-Z_.-]+)(/.*|)$ view/videoEmbeded.php?videos_id=$2&channelName=$1 [L,QSA,NC]
RewriteRule ^video/([0-9]+)/?$ view/modeYoutube.php?videos_id=$1 [QSA]
RewriteRule ^video/([0-9]+)/poster.png$ view/videoGetPoster.php?videos_id=$1 [QSA]
#Video ID routes
RewriteRule ^v/(.[0-9a-zA-Z_.-]+)/?([^!#$&'(),/:;=?@[]]+/)?$ view/modeYoutube.php?v=$1 [QSA]
RewriteRule ^video/(.[0-9a-zA-Z_.-]+)/?([^!#$&'(),/:;=?@[]]+/)?$ view/modeYoutube.php?v=$1 [QSA]
RewriteRule ^vEmbed/(.[0-9a-zA-Z_.-]+)/?([^!#$&'(),/:;=?@[]]+/)?$ view/videoEmbeded.php?v=$1 [QSA]
RewriteRule ^videoEmbeded/(.[0-9a-zA-Z_.-]+)/?([^!#$&'(),/:;=?@[]]+/)? view/videoEmbeded.php?v=$1 [QSA]
#Video name routes
RewriteRule ^video/([0-9a-zA-Z_.-]+)/page/([0-9]+)/?$ view/modeYoutube.php?videoName=$1&page=$2 [QSA]
RewriteRule ^video/([0-9a-zA-Z_.-]+)/([^!#$&'(),/:;=?@[\]]+)/page/([0-9]+)/?$ view/modeYoutube.php?v=$1&page=$3 [QSA]
RewriteRule ^video/([0-9a-zA-Z_.-]+)/([^!#$&'(),/:;=?@[\]]+)/?$ view/modeYoutube.php?v=$1 [QSA]
RewriteRule ^video/([0-9a-zA-Z_.-]+)/([0-9]+)?$ view/modeYoutube.php?videoName=$1 [QSA]
RewriteRule ^video/([0-9a-zA-Z_.-]+)/?$ view/modeYoutube.php?videoName=$1 [QSA]
#Other video routes
RewriteRule ^v/([0-9a-zA-Z_.-]+)/page/([0-9]+)/?$ view/modeYoutube.php?v=$1&page=$2 [QSA]
#RewriteRule ^v/([0-9a-zA-Z_.-]+)/?$ view/modeYoutube.php?v=$1 [QSA]
RewriteRule ^evideo/([a-zA-z0-9=]+)/?$ view/modeYoutube.php?evideo=$1 [QSA]
# For the video name
RewriteRule ^cat/([^!#$&'()*,\/:;=?@[\]]+)/video/([^!#$&'()*+,\/:;=?@[\]]+)/page/([0-9]+)/?$ view/modeYoutube.php?catName=$1&videoName=$2&page=$3 [QSA]
RewriteRule ^cat/([^!#$&'()*,\/:;=?@[\]]+)/video/([^!#$&'()*+,\/:;=?@[\]]+)/?$ view/modeYoutube.php?catName=$1&videoName=$2 [QSA]
# For the embedded video name
RewriteRule ^cat/([^!#$&'()*,\/:;=?@[\]]+)/videoEmbeded/([^!#$&'()*+,\/:;=?@[\]]+)/?$ view/videoEmbeded.php?catName=$1&videoName=$2 [QSA]
RewriteRule ^evideoEmbed/([a-zA-z0-9=]+)/?$ view/videoEmbeded.php?evideo=$1 [QSA]
RewriteRule ^vEmbed/([0-9a-zA-Z_.-]+)/?$ view/videoEmbeded.php?v=$1 [QSA]
RewriteRule ^videoEmbed/([0-9a-zA-Z_.-]+)/? view/videoEmbeded.php?v=$1 [QSA]
RewriteRule ^videoEmbed/([^!#$&'()*+,\/:;=?@[\]]+)/?$ view/videoEmbeded.php?videoName=$1 [QSA]
RewriteRule ^videoEmbeded/([0-9a-zA-Z_.-]+)/?$ view/videoEmbeded.php?videoName=$1 [QSA]
RewriteRule ^plugin/([^!#$&'()*+,\/:;=?@[\]]+)/(.*)?$ plugin/$1/$2 [NC,L]
RewriteRule ^upload$ view/mini-upload-form/ [NC,L]
RewriteRule ^fileUpload$ view/mini-upload-form/upload.php [NC,L]
RewriteRule ^uploadPoster/([0-9]+)/(jpg|gif)$ objects/uploadPoster.php?video_id=$1&type=$2 [NC,L]
#for the Article name
RewriteRule ^article/([0-9a-zA-Z_.-]+)/?([^!#$&'(),/:;=?@[]]+)?/?$ view/modeYoutube.php?v=$1 [QSA]
RewriteRule ^article/([0-9a-zA-Z_.-]+)/([^!#$&'(),/:;=?@[]]+)/?$ view/modeYoutube.php?v=$1 [QSA]
RewriteRule ^article/([0-9a-zA-Z_.-]+)/([^!#$&'(),/:;=?@[]]+)/page/([0-9]+)/??$ view/modeYoutube.php?v=$1&page=$3 [QSA]
RewriteRule ^article/([^!#$&'(),/:;=?@[]]+)/?$ view/modeYoutube.php?videoName=$1 [QSA]
RewriteRule ^article/([^!#$&'(),/:;=?@[]]+)/page/([0-9]+)/??$ view/modeYoutube.php?videoName=$1&page=$2 [QSA]
#for the embeded article name
RewriteRule ^articleEmbed/([0-9a-zA-Z_.-]+)/[0-9a-zA-Z_.-]*?$ view/videoEmbeded.php?v=$1 [QSA]
RewriteRule ^articleEmbed/([0-9a-zA-Z_.-]+)/?$ view/videoEmbeded.php?v=$1 [QSA]
RewriteRule ^articleEmbed/([^!#$&'()+,/:;=?@[]]+)/?$ view/videoEmbeded.php?videoName=$1 [QSA]
RewriteRule ^articleEmbed/([0-9a-zA-Z_.-]+)/([^!#$&'()+,/:;=?@[]]+)/?$ view/videoEmbeded.php?v=$1 [QSA]
# audio and video IDs
RewriteRule ^article/(.[0-9a-zA-Z_.-]+)/([^!#$&'()*,\/:;=?@[\]]+/)?$ view/modeYoutube.php?v=$1&includeType=article [QSA]
RewriteRule ^articleEmbed/(.[0-9a-zA-Z_.-]+)/?([^!#$&'()*,\/:;=?@[\]]+/)? view/videoEmbeded.php?v=$1&includeType=article [QSA]
# audio regular ID
RewriteRule ^article/([0-9]+)/poster.png$ view/videoGetPoster.php?videos_id=$1&includeType=article [QSA]
RewriteRule ^article/([0-9]+)/?$ view/modeYoutube.php?v=$1&includeType=article [QSA]
RewriteRule ^article/([0-9a-zA-Z_.-]+)/([^!#$&'()*,\/:;=?@[\]]+)/?$ view/modeYoutube.php?v=$1&includeType=article [QSA]
RewriteRule ^article/([0-9a-zA-Z_.-]+)/([^!#$&'()*,\/:;=?@[\]]+)/page/([0-9]+)/??$ view/modeYoutube.php?v=$1&page=$3&includeType=article [QSA]
# audio and video IDs
RewriteRule ^audio/(.[0-9a-zA-Z_.-]+)/?([^!#$&'()*,\/:;=?@[\]]+/)?$ view/modeYoutube.php?v=$1&includeType=audio [QSA]
RewriteRule ^audioEmbed/(.[0-9a-zA-Z_.-]+)/?([^!#$&'()*,\/:;=?@[\]]+/)? view/videoEmbeded.php?v=$1&includeType=audio [QSA]
# audio regular ID
RewriteRule ^audio/([0-9]+)/poster.png$ view/videoGetPoster.php?videos_id=$1&includeType=audio [QSA]
RewriteRule ^audio/([0-9]+)/?$ view/modeYoutube.php?v=$1&includeType=audio [QSA]
RewriteRule ^audio/([0-9a-zA-Z_.-]+)/([^!#$&'()*,\/:;=?@[\]]+)/?$ view/modeYoutube.php?v=$1&includeType=audio [QSA]
RewriteRule ^audio/([0-9a-zA-Z_.-]+)/([^!#$&'()*,\/:;=?@[\]]+)/page/([0-9]+)/??$ view/modeYoutube.php?v=$1&page=$3&includeType=audio [QSA]
#for the cat and embeded article name
RewriteRule ^cat/([^!#$&'()*,/:;=?@[]]+)/articleEmbed/([0-9a-zA-Z_.-]+)/?$ view/videoEmbeded.php?catName=$1&videoName=$2 [QSA]
#edit your own user
RewriteRule ^user$ view/user.php [NC,L]
RewriteRule ^user/([0-9]+)/foto.png$ view/userGetPhoto.php?users_id=$1 [QSA]
#manager user
RewriteRule ^users$ view/managerUsers.php [NC,L]
RewriteRule ^users.json$ objects/users.json.php [NC,L]
#RewriteRule ^updateUser$ objects/userUpdate.json.php [NC,L]
RewriteRule ^savePhoto$ objects/userSavePhoto.php [NC,L]
RewriteRule ^saveBackground$ objects/userSaveBackground.php [NC,L]
RewriteRule ^addNewUser$ objects/userAddNew.json.php [NC,L]
RewriteRule ^deleteUser$ objects/userDelete.json.php [NC,L]
RewriteRule ^recoverPass$ objects/userRecoverPass.php [NC,L]
RewriteRule ^saveRecoverPassword$ objects/userRecoverPassSave.json.php [NC,L]
RewriteRule ^signUp$ view/userSignUp.php [NC,L]
RewriteRule ^createUser$ objects/userCreate.json.php [NC,L]
RewriteRule ^usersGroups$ view/managerUsersGroups.php [NC,L]
RewriteRule ^usersGroups.json$ objects/usersGroups.json.php [NC,L]
RewriteRule ^addNewUserGroups$ objects/userGroupsAddNew.json.php [NC,L]
RewriteRule ^deleteUserGroups$ objects/userGroupsDelete.json.php [NC,L]
#manager category
RewriteRule ^categories$ view/managerCategories.php [NC,L]
RewriteRule ^categories.json$ objects/categories.json.php [NC,L]
RewriteRule ^addNewCategory$ objects/categoryAddNew.json.php [NC,L]
RewriteRule ^deleteCategory$ objects/categoryDelete.json.php [NC,L]
RewriteRule ^listCategories$ view/listCategories.php [NC,L]
#manager plugin
RewriteRule ^plugins$ view/managerPlugins.php [NC,L]
RewriteRule ^plugins.json$ objects/plugins.json.php [NC,L]
RewriteRule ^pluginsAvailable.json$ objects/pluginsAvailable.json.php [NC,L]
RewriteRule ^pluginImport.json$ objects/pluginImport.json.php [NC,L]
RewriteRule ^switchPlugin$ objects/pluginSwitch.json.php [NC,L]
RewriteRule ^addDataObjectPlugin.json$ objects/pluginAddDataObject.json.php [NC,L]
RewriteRule ^runDBScriptPlugin.json$ objects/pluginRunDatabaseScript.json.php [NC,L]
#manager playList
RewriteRule ^epg.xml$ plugin/PlayLists/epg.xml.php [NC,L,QSA]
RewriteRule ^epg.json$ plugin/PlayLists/epg.json.php [NC,L,QSA]
RewriteRule ^epg.html$ plugin/PlayLists/epg.html.php [NC,L,QSA]
RewriteRule ^epg$ plugin/PlayLists/epg.php [NC,L,QSA]
RewriteRule ^tv$ plugin/PlayLists/tv.php [NC,L,QSA]
RewriteRule ^iptv$ plugin/PlayLists/iptv.php [NC,L,QSA]
RewriteRule ^iptv/([^/]+)/?$ plugin/PlayLists/iptv.php?channelName=$1 [NC,L,QSA]
RewriteRule ^playLists.json$ objects/playlists.json.php [NC,L]
RewriteRule ^playListsVideos.json$ objects/playlistsVideos.json.php [NC,L]
RewriteRule ^playListsFromUser.json/([0-9]+)/?$ objects/playlistsFromUser.json.php?users_id=$1 [NC,L]
RewriteRule ^addNewPlayList$ objects/playlistAddNew.json.php [NC,L]
RewriteRule ^playListAddVideo.json$ objects/playListAddVideo.json.php [NC,L]
RewriteRule ^playlist/([0-9]+)/([0-9]+)/?$ view/modeYoutube.php?playlist_id=$1&playlist_index=$2 [NC,L]
RewriteRule ^playlist/([0-9]+)/?$ view/modeYoutube.php?playlist_id=$1 [NC,L]
RewriteRule ^removeVideoFromPlaylist/?$ objects/playlistRemoveVideo.php [NC,L]
RewriteRule ^removePlaylist/?$ objects/playlistRemove.php [NC,L]
RewriteRule ^renamePlaylist/?$ objects/playlistRename.php [NC,L]
RewriteRule ^sortPlaylist/?$ objects/playlistSort.php [NC,L]
RewriteRule ^rss/?$ feed/index.php [QSA]
RewriteRule ^mrss/?$ feed/index.php?mrss=1 [QSA]
RewriteRule ^roku.json$ feed/index.php?roku=1 [QSA]
RewriteRule ^vizio.json$ feed/index.php?vizio=1 [QSA]
RewriteRule ^roku.search.json$ feed/index.php?rokuSearch=1 [QSA]
RewriteRule ^channel/([^/]+)/roku.json$ feed/index.php?channelName=$1&roku=1 [QSA]
RewriteRule ^channel/([^/]+)/feed/?$ feed/index.php?channelName=$1 [QSA]
RewriteRule ^channel/([^/]+)/rss/?$ feed/index.php?channelName=$1 [QSA]
RewriteRule ^channel/([^/]+)/mrss/?$ feed/index.php?channelName=$1&mrss=1 [QSA]
RewriteRule ^channel/([^/]+) view/channel.php?channelName=$1 [QSA]
RewriteRule ^channel/?$ view/channel.php [QSA]
RewriteRule ^channels/?$ view/channels.php [NC,L]
#playlist alias
RewriteRule ^play/([0-9]+)/([0-9]+) plugin/PlayLists/player.php?playlists_id=$1&playlist_index=$2 [L,QSA]
RewriteRule ^play/([0-9]+) plugin/PlayLists/player.php?playlists_id=$1 [L,QSA]
RewriteRule ^playEmbed/([0-9]+)/([0-9]+) plugin/PlayLists/embed.php?playlists_id=$1&playlist_index=$2 [L,QSA]
RewriteRule ^playEmbed/([0-9]+) plugin/PlayLists/embed.php?playlists_id=$1 [L,QSA]
RewriteRule ^playTag/([0-9]+)/([0-9]+) plugin/PlayLists/player.php?tags_id=$1&playlist_index=$2 [L,QSA]
RewriteRule ^playTag/([0-9]+) plugin/PlayLists/player.php?tags_id=$1 [L,QSA]
RewriteRule ^playTagEmbed/([0-9]+)/([0-9]+) plugin/PlayLists/embed.php?tags_id=$1&playlist_index=$2 [L,QSA]
RewriteRule ^playTagEmbed/([0-9]+) plugin/PlayLists/embed.php?tags_id=$1 [L,QSA]
RewriteRule ^programs.json$ objects/playlists.json.php [QSA]
RewriteRule ^program/([0-9]+)/([0-9]+)(/.*)?$ view/modeYoutube.php?playlist_id=$1&playlist_index=$2 [QSA]
RewriteRule ^program/([0-9]+)(/.*)?$ view/modeYoutube.php?playlist_id=$1 [QSA]
RewriteRule ^viewProgram/([0-9]+).*?$ view/channelProgram.php?program_id=$1 [QSA]
RewriteRule ^favorite/?$ view/modeYoutube.php?playlist_name=favorite [QSA]
RewriteRule ^watch-later/?$ view/modeYoutube.php?playlist_name=watch-later [QSA]
#manager videos
RewriteRule ^orphanFiles$ view/orphanFiles.php [NC,L]
RewriteRule ^mvideos$ view/managerVideos.php [NC,L]
RewriteRule ^videos.json$ objects/videos.json.php [NC,L]
RewriteRule ^videosAndroid.json$ objects/videosAndroid.json.php [NC,L]
RewriteRule ^videoAndroid.json$ objects/videoAndroid.json.php [NC,L]
RewriteRule ^deleteVideo$ objects/videoDelete.json.php [NC,L]
RewriteRule ^addNewVideo$ objects/videoAddNew.json.php [NC,L]
RewriteRule ^refreshVideo$ objects/videoRefresh.json.php [NC,L]
RewriteRule ^setStatusVideo$ objects/videoStatus.json.php [NC,L]
RewriteRule ^setCategoryVideo$ objects/videoCategory.json.php [NC,L]
RewriteRule ^rotateVideo$ objects/videoRotate.json.php [NC,L]
# Subscribes
RewriteRule ^subscribes$ view/managerSubscribes.php [NC,L]
RewriteRule ^subscribes.json$ objects/subscribes.json.php [NC,L]
RewriteRule ^subscribe.json$ objects/subscribe.json.php [NC,L]
RewriteRule ^notifySubscribers.json$ objects/notifySubscribers.json.php [NC,L]
RewriteRule ^aVideoQueueEncoder.json$ objects/aVideoQueueEncoder.json.php [NC,L]
RewriteRule ^aVideoEncoder.json$ objects/aVideoEncoder.json.php [NC,L]
RewriteRule ^aVideoEncoderChunk.json$ objects/aVideoEncoderChunk.json.php [NC,L]
#comment
RewriteRule ^comments$ view/managerComments.php [NC,L]
RewriteRule ^saveComment$ objects/commentAddNew.json.php [NC,L]
RewriteRule ^comments.json/([0-9]+)$ objects/comments.json.php?video_id=$1 [NC,L]
RewriteRule ^login$ objects/login.json.php [NC,L]
RewriteRule ^logoff$ objects/logoff.php [NC,L]
RewriteRule ^like$ objects/like.json.php?like=1 [QSA]
RewriteRule ^dislike$ objects/like.json.php?like=-1 [QSA]
#manager configuration
RewriteRule ^update/?$ view/update.php [NC,L]
RewriteRule ^siteConfigurations$ view/configurations.php [NC,L]
RewriteRule ^updateConfig$ objects/configurationUpdate.json.php [NC,L]
RewriteRule ^charts$ view/charts.php [NC,L]
RewriteRule ^help$ view/help.php [NC,L]
# YouTube Sync
RewriteRule ^youtubeUpload$ objects/youtubeUpload.json.php [NC,L]
RewriteRule ^googleAdView$ view/googleAdView.php [NC,L]
RewriteRule ^notifications.json$ objects/notifications.json.php [NC,L]
RewriteRule ^sitemap.xml$ view/sitemap.xml.php [NC,L]
RewriteRule ^cat/([^!#$&'()*,\/:;=?@[\]]+)/sitemap.xml$ view/sitemap.xml.php?catName=$1 [NC,L]
RewriteRule ^robots.txt$ view/robots.txt.php [NC,L]
RewriteRule ^manifest.json$ view/manifest.json.php [NC,L]
RewriteRule ^videos/(.*)/index.m3u8$ view/hls.php?videoDirectory=$1 [NC,L,QSA]
RewriteRule ^videos/(.*)/index.m3u8.mp4$ view/hls.php?playHLSasMP4=1&videoDirectory=$1 [NC,L,QSA]
RewriteRule ^vast.xml/?([0-9]+)?$ plugin/AD_Server/VAST.php?campaign_has_videos_id=$1 [NC,L]
RewriteRule ^activate/?$ view/activate.php [NC,L,QSA]
<IfModule mod_xsendfile.c>
# Allow direct access to files in the convertedMP4 directory
RewriteRule ^videos/convertedMP4/([0-9]+(\.(mp4|webm|m3u8|mp3|ogg|jpg)))$ /videos/convertedMP4/$1 [L,END]
# Rewrite other URLs to xsendfile.php
RewriteRule ^videos/([_A-Za-z0-9.-]+/)?([^!#$&'()*+,\/:;=?@[\]]+(\.(mp4|webm|m3u8|mp3|ogg)))$ view/xsendfile.php?file=$2&folder=$1 [QSA,END]
RewriteRule ^videos/cache/download/([_A-Za-z0-9.-]+/)?([^!#$&'()*+,\/:;=?@[\]]+(\.(mp4|webm|m3u8|mp3|ogg)))$ view/xsendfile.php?file=$2&cacheDownload=1 [QSA,END]
</IfModule>
# Special redirect for videos/userPhoto/photo[0-9]+.png to user/[0-9]+/foto.png if not found
RewriteCond %{REQUEST_URI} ^/videos/userPhoto/photo([0-9]+)\.png$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ /user/%1/foto.png [L,R=302]
# if image does not exist
RewriteCond %{REQUEST_URI} \.(webp|jpg|jpeg|gif|png|ico)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*)$ img/image404.php?image=$1 [NC,L]
# for other missing files
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .*$ view/error.php [NC,L]
</IfModule>
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
</IfModule>
AddType text/vtt .vtt
#php_value post_max_size 4G
#php_value upload_max_filesize 4G