Files
mediaplayer/.htaccess
T
Ty Clifford 1abe5218ca - Implemented configurable public URL rewriting.
What changed:
Added pretty URL helpers/default setting in 
[includes/db.php](/Users/tyemeclifford/Documents/GH/mediaplayer/includes/db.php).
Added root rewrite rules in 
[.htaccess](/Users/tyemeclifford/Documents/GH/mediaplayer/.htaccess):/v/<slug>
/all
/search/<query>

Added Admin → Settings “Public URL Style” toggle in 
[admin/settings.php](/Users/tyemeclifford/Documents/GH/mediaplayer/admin/settings.php), 
defaulting to pretty URLs.
Updated public/player/catalogue/embed/admin preview links to use the 
configured URL style.
Added redirects from legacy ?v= and ?q= URLs to pretty routes when 
rewriting is enabled.
Documented deployment and fallback behavior in 
[README.md](/Users/tyemeclifford/Documents/GH/mediaplayer/README.md).
2026-06-24 13:16:55 -04:00

11 lines
286 B
ApacheConf

DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^v/([^/]+)/?$ index.php?v=$1 [B,L,QSA]
RewriteRule ^all/?$ catalogue.php [L,QSA]
RewriteRule ^search/?$ catalogue.php [L,QSA]
RewriteRule ^search/(.+)/?$ catalogue.php?q=$1 [B,L,QSA]
</IfModule>