Problem when i configure permalink

The basic rewrite rules for pretty permalinks in WordPress look like this: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress Note the RewriteRule. That part is missing in your file.

Permalink structure as code in back-end?

Your code works to create links, and WordPress should make a valiant effort to find the correct post, but it doesn’t get complete permalinks. To do that you will need to query the database for the post and construct a permalink if one is found. function transform_pseudo_anchor_wpse_101201($match) { global $wpdb; if (isset($match[1])) { $name = … Read more

How do you put your own rules into .htaccess?

This is the default. WordPress will add markers before and after its rules and not touch anything else: # BEGIN WordPress # WP rules here … # END WordPress Just make sure to set your rules before the WordPress rules, because WordPress’ rewrite rules are rather greedy (they have to), so later rules will probably … Read more