Append country to ‘pretty’ url but serve same page

If you are needing one rewrite rule for that single page, this snippet should get you there. You’ll need to replace the XXXX in that snippet to be your post ID of your signup page. function signup_pg_rewrite_rule() { add_rewrite_rule(‘^signup/([^/]*)/?’,’index.php?page_id=XXXX&country_code=$matches[1]’,’top’); } add_action(‘init’, ‘signup_pg_rewrite_rule’, 10, 0); After you drop this in, you’ll need to flush that rewrite … Read more

Htaccess redirect after changing Language URL format

In order to catch either lang=en or lang=ru you can change those directives like this: RewriteCond %{QUERY_STRING} lang=(en|ru) # exclude all requests starting with /wp-admin/ RewriteCond %{REQUEST_URI} !^/wp-admin/ RewriteRule (.*) /%1/$1? [L,R=302] The (en|ru) part matches either en or ru and the surrounding parentheses make this a capturing group that can be referenced later. The … Read more

Setting custom search engine indexing for a “dynamic WordPress page” with htaccess

You’ll need the Header set …. directive, but to set it conditionally based on the URL. One way of doing this is to use mod_rewrite to set an environment variable (eg. ROBOTS_INDEX) when your URL criteria are met (for the URLs you want indexed) and use the env= argument to the Header directive to conditionally … Read more

How to add new redirection on wordpress site

To redirect just those 3 URLs (with variable ticket number) on the support subdomain then you can do something like the following before the WordPress front-controller (assuming the support subdomain resolves to the same place and is probably handled by WP) using mod_rewrite, in the root .htaccess file: RewriteCond %{HTTP_HOST} ^support\.example\.com [NC] RewriteRule ^((?:a/)?ticket/\d+)?$ https://support.example1.com/$0 … Read more

NextGEN Gallery Lightbox – Social Share URL Redirect

You could do something like the following in .htaccess before the existing WordPress directives. RewriteCond %{QUERY_STRING} ^uri=(/[^&]+) RewriteRule ^nextgen-share/(\d+/\d+)/full$ %1#gallery/$1 [QSD,NE,R,L] The RewriteRule pattern only matches against the URL-path, so you need the preceding RewriteCond directive in order to match the query string portion of the URL. If the /121212/8989/ part always consists of 6 … Read more

Transfer to HTTPS – mixed content on main page only [closed]

You appear to be lazy-loading responsive images, so whether the insecure images load (or rather “blocked”) is dependent on screen size. You have many data-srcset attributes that reference http:// – these also appear to reference your non-canonical “domain apex” (ie. example.com), as opposed to the canonical hostname with a www subdomain (ie. www.example.com), so these … Read more