- 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:
+3
-3
@@ -224,16 +224,16 @@ function render_topbar(string $active = ''): void {
|
||||
<header class="topbar">
|
||||
<div class="topbar-brand">
|
||||
<div>
|
||||
<a href="index.php" class="brand-name"><?= h($title) ?></a>
|
||||
<a href="<?= h(public_home_url()) ?>" class="brand-name"><?= h($title) ?></a>
|
||||
<div class="brand-sub"><?= h($sub) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<nav class="topbar-social" aria-label="Navigation">
|
||||
<a class="social-pill <?= $active==='home' ? 'active' : '' ?>" href="index.php">
|
||||
<a class="social-pill <?= $active==='home' ? 'active' : '' ?>" href="<?= h(public_home_url()) ?>">
|
||||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"/><polyline points="9,22 9,12 15,12 15,22"/></svg>
|
||||
Home
|
||||
</a>
|
||||
<a class="social-pill <?= $active==='catalogue' ? 'active' : '' ?>" href="catalogue.php">
|
||||
<a class="social-pill <?= $active==='catalogue' ? 'active' : '' ?>" href="<?= h(public_catalogue_url()) ?>">
|
||||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg>
|
||||
Videos
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user