Standard Regex syntax doesn’t work in WordPress rewrite rule
Standard Regex syntax doesn’t work in WordPress rewrite rule
Standard Regex syntax doesn’t work in WordPress rewrite rule
Here’s a solution to the problem. Not sure it’s the best one, but it does work. From lots of reading and a bit of poking around in the wordpress core (code), it seems that non_wp rewrite rules only work on Apache. DevKinsta is Nginx-based, and there’s precious little out there at this deep level on … Read more
Can you try by adding the following rules at the end of your .htaccess file? RewriteEngine On RewriteCond %{HTTP_HOST} ^example.com/wordpress$ [OR] RewriteCond %{HTTP_HOST} ^www.example.com/wordpress$ RewriteRule (.*)$ https://example.com/$1 [R=301,L] Replace example.com with your website url. Even if it works and doesn’t cause an infinite redirect, this is not the correct solution. I’ll try and take a … Read more
add_rewrite_rule doesn’t work when trying to add a new parameter at the end of URL
WP-Include rewrite directory
Why? This is because the pretty permalink: /tag/online-lectures/?cat=7 gets translated to the ugly permalink: index.php?tag=online-lectures&cat=7 And as you can see the /tag/online-lectures part no longer has the emphasis it once had. Afterall /category/arrester?tag=online-lectures would boil down to exactly the same ugly URL. Since the resulting query is an archive, and the most specific template available … Read more
It looks like your add_rewrite_rule function is not quite correct. The first parameter should be the regular expression pattern that you want to match, and the second parameter should be the query string that you want to rewrite the URL to. Also, you don’t need to include the file extension in the URL. Try updating … Read more
Using .htaccess to redirect /da/ to / in URL
Rewrite rule giving 404 error
Rewrite URLs in a Custom Post Type with Multiple Taxonomies