- 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).
This commit is contained in:
Ty Clifford
2026-06-24 13:16:55 -04:00
parent 0f262cab3f
commit 1abe5218ca
13 changed files with 187 additions and 30 deletions
+1 -1
View File
@@ -200,7 +200,7 @@ header('Content-Security-Policy: frame-ancestors *');
<!-- Title + brand overlay -->
<div class="title-overlay" id="title-overlay">
<span class="title-text"><?= htmlspecialchars($video['title'], ENT_QUOTES) ?></span>
<a class="brand-link" href="<?= $base_url ?>index.php?v=<?= urlencode($video['slug']) ?>"
<a class="brand-link" href="<?= h(public_absolute_url(public_video_url($video['slug']))) ?>"
target="_blank" rel="noopener">tyclifford.com</a>
</div>