Here your dreams cum true
location ~ ^/archive/index.php/topic-(\d+)\.html$ { rewrite ^/archive/index.php/topic-(\d+)\.html$ /viewtopic.php?t=$1 last; try_files $uri $uri/ /index.php?$args; } Reload Nginx after applying: sudo systemctl reload nginx Clearing the cache is not enough anymore. You must rebuild the archive index. Use this CLI command (if you have SSH access):
If this guide resolved your issue, please share it with your network. For further assistance, consult your platform’s official support channels and reference this article’s timestamp: . Happy archiving! Keywords: topic links 22 archive fix new, broken archive links, repair topic URLs, PHP 8 archive fix, htaccess rewrite for archives, rebuild topic index. topic links 22 archive fix new
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / # New fix for topic links 22 archive RewriteCond %{REQUEST_URI} ^/archive/.*topic-([0-9]+) [NC] RewriteRule ^archive/index.php/topic-([0-9]+)\.html$ /viewtopic.php?t=$1 [L,QSA,END] </IfModule> The END flag stops all subsequent rewrite processing, a critical improvement for PHP 8.2+ environments. Step 4: Nginx Users (The New Configuration) If you run Nginx, the old try_files directives fail. Here is the new working configuration: location ~ ^/archive/index
SecFilterEngine Off SecFilterScanPOST Off Modify your archive configuration file ( config/archive.php ): <IfModule mod_rewrite
If the number "22" (the topic ID) is correct but the page fails, your issue is routing. If the number has changed, it is a database mapping error. Connect to your database using phpMyAdmin or Adminer. Run the following SQL query to re-index your archived topics:
Published by: Tech Solutions Desk Reading time: 8 minutes
UPDATE `archive_topics` SET `topic_links` = CONCAT('topic-', `topic_id`, '.html') WHERE `archive_version` = 22 AND `topic_links` IS NULL; Previous fixes ignored the archive_version column. The new query specifically targets version 22 archives, preventing unintended alterations to newer topics. Step 3: Implement the New .htaccess Rewrite Rules For Apache servers, the old rules used [R=301,L] . The new fix includes the [END] flag to prevent loopbacks. Add this to your root .htaccess file:
location ~ ^/archive/index.php/topic-(\d+)\.html$ { rewrite ^/archive/index.php/topic-(\d+)\.html$ /viewtopic.php?t=$1 last; try_files $uri $uri/ /index.php?$args; } Reload Nginx after applying: sudo systemctl reload nginx Clearing the cache is not enough anymore. You must rebuild the archive index. Use this CLI command (if you have SSH access):
If this guide resolved your issue, please share it with your network. For further assistance, consult your platform’s official support channels and reference this article’s timestamp: . Happy archiving! Keywords: topic links 22 archive fix new, broken archive links, repair topic URLs, PHP 8 archive fix, htaccess rewrite for archives, rebuild topic index.
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / # New fix for topic links 22 archive RewriteCond %{REQUEST_URI} ^/archive/.*topic-([0-9]+) [NC] RewriteRule ^archive/index.php/topic-([0-9]+)\.html$ /viewtopic.php?t=$1 [L,QSA,END] </IfModule> The END flag stops all subsequent rewrite processing, a critical improvement for PHP 8.2+ environments. Step 4: Nginx Users (The New Configuration) If you run Nginx, the old try_files directives fail. Here is the new working configuration:
SecFilterEngine Off SecFilterScanPOST Off Modify your archive configuration file ( config/archive.php ):
If the number "22" (the topic ID) is correct but the page fails, your issue is routing. If the number has changed, it is a database mapping error. Connect to your database using phpMyAdmin or Adminer. Run the following SQL query to re-index your archived topics:
Published by: Tech Solutions Desk Reading time: 8 minutes
UPDATE `archive_topics` SET `topic_links` = CONCAT('topic-', `topic_id`, '.html') WHERE `archive_version` = 22 AND `topic_links` IS NULL; Previous fixes ignored the archive_version column. The new query specifically targets version 22 archives, preventing unintended alterations to newer topics. Step 3: Implement the New .htaccess Rewrite Rules For Apache servers, the old rules used [R=301,L] . The new fix includes the [END] flag to prevent loopbacks. Add this to your root .htaccess file:
Copyright © 2025 Femdom-blog