Spaces:
Running
Running
Download wp-content/mu-plugins/fix-permalinks.php from OptiMix51/optimix-blog: direct link, hf CLI and curl.
- Browser
- Download file 515 Bytes
-
https://huggingface.co/spaces/OptiMix51/optimix-blog/resolve/main/wp-content/mu-plugins/fix-permalinks.php
- Command line
-
hf download hf://spaces/OptiMix51/optimix-blog/wp-content/mu-plugins/fix-permalinks.php
-
curl -L -o fix-permalinks.php https://huggingface.co/spaces/OptiMix51/optimix-blog/resolve/main/wp-content/mu-plugins/fix-permalinks.php
515 Bytes
| /** | |
| * Plugin Name: OptiMix Permalinks Fix | |
| * Description: Forces clean permalinks by overriding rewrite checks. | |
| */ | |
| // Force WordPress to believe mod_rewrite is enabled | |
| add_filter('got_rewrite', '__return_true', 999); | |
| // Force the permalink structure without writing to the DB | |
| add_filter('pre_option_permalink_structure', function($structure) { | |
| return '/%postname%/'; | |
| }); | |
| // Flush rewrite rules to ensure the new structure is active | |
| add_action('init', function() { | |
| flush_rewrite_rules(); | |
| }, 999); | |