Tag Info

Hot answers tagged

4

The rewrite API won't redirect - it just "maps" URL structures to query strings - you'll need to do this yourself. First things first, fix that rewrite rule: 'episode/([^/]+)/transcript'; // Matches anything that follows transcript, not what we want! 'episode/([^/]+)/transcript/?$'; // Matches only "episode/name/transcript", optionally with a trailing ...


1

Use this plugin in wordpress and write rule which will overwrite nginx rule. https://wordpress.org/plugins/rewrite/ When you have wordpress, you have to set permalink to default to work your webserver rule work and if you dont want to do that you have to install above plugin and write rule.


1

You cannot do this with redirect. Since, by definition, redirect sends browser off to a different location. You would need to map domain to an actual WordPress installation. It's not hard to have WP respond to different domain requests, however in your case it's complicated that you would need it to respond differently conditional on domain in request. I ...


1

You should be able to use category_name=$matches[1] instead of cat=$matches[1] Generally speaking, you can use any built-in public query variable and custom ones, after some additional work, see the add_rewrite_rule() codex entry for more information.



Only top voted, non community-wiki answers of a minimum length are eligible