301 Redirect domain Sub-folders to Subdomain subfolder

If both the main domain and subdomain point to the same directory on the filesystem, then you need to check the requested host using a mod_rewrite condition. So, for example, the following directives should go before the WordPress front-controller (ie. before the # BEGIN WordPress section): RewriteCond %{HTTP_HOST} ^(example\.com) [NC] RewriteRule ^(music/end/)$ http://music.%1/$1 [R=301,L] The … Read more

WP install in sub-dir white screen

If WordPress is installed in the directory /dir1/dir2 and the corresponding .htaccess file is also in that subdirectory, ie. /dir1/dir2/.htaccess, then the .htaccess file should look something like: # 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 … 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

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

How to ignore folder in site root while accessing a URL

Ordinarily, requests for physical directories (and files) are not routed to WordPress. You could make an exception for this one folder (or URL) and specifically rewrite requests for /connect to index.php (the WordPress front-controller). Try the following before the # BEGIN WordPress section: # Override directory RewriteRule ^connect index.php [L]

Case insensitive header params for API request

This would seem to be a “fault” of the way WordPress (the “server”) is reading the HTTP request headers. (If they are being read into an associative array without any normalisation then the comparison will naturally be case-sensitive.) This should arguably be “fixed” in WP. However, it’s possible to create a “workaround” in .htaccess and … Read more