WordPress multilingual website domain and folders

Providing you’ve already updated the internal links and that example.jp points to the same place on the filesystem as example.com (via CNAME and appropriate server config changes) then you don’t necessarily need to rewrite to example.com, since example.jp accesses the same files. Trying to rewrite to a different domain will implicitly trigger an external redirect … Read more

Force www to non-www on a subdomain in WordPress?

Forcing www to non-www is simple at the primary domain level. It’s actually the same for the subdomain (depending on how you’ve written the directives in the first place). If the hostname (main domain or subdmomain) starts with www. then remove it. (Forcing non-www to www for subdomains and main domains is a little more … Read more

.htaccess redirects no longer work

RedirectMatch 301 ^/watermeloncakes/ //www.clienturl.com/watermelon-cakes-1/ (I assuming www.clienturl.com is the hostname for this site.) Well, here’s the thing… this would never have worked on any version of Apache!? Because protocol-relative URLs are not supported by mod_alias RedirectMatch (or Redirect) or mod_rewrite for that matter. From the Apache docs: The new URL may be either an absolute … Read more

Setup Permanent 301 Redirects after moving to Https [closed]

RewriteCond %{HTTP_HOST} ^xxxz.com.qa [NC,OR] RewriteCond %{HTTP_HOST} ^www.xxxz.com.qa [NC] RewriteRule ^(.*)$ https://www.xxxz.com.qa/$1 [L,R=301,NC] This will result in a redirect loop as it will repeatedly redirect https://www.xxxz.com.qa/<url> to https://www.xxxz.com.qa/<url> again and again… If you want to redirect from HTTP then you need to check that the request was for HTTP before redirecting to HTTPS. For example: RewriteCond … Read more

Redirect main domain to subdirectory

From the two .htaccess files you posted I can’t see how your site is working at all?! If you request example.com/ (the document root) then the second rule in the root .htaccess file rewrites the request directly to /subdirectory/index.html (not index.php). If /subdirectory/index.html exists then the (non-WordPress) file is served, otherwise see #2 If you … Read more

Keep getting 401 error from WordPress on AWS Lightsail

I’ve found a solution. The WordPress made from AWS Lightsail instance image is bitnami WordPress. And the bitnami WordPress is disabled Basic Authentication as default. So it needs some modification on /opt/bitnami/apps/WordPress/conf/httpd-app.conf to enable Basic Authentication. This modification is adding 3 lines below. RewriteEngine on RewriteCond %{HTTP:Authorization} ^(.*) RewriteRule ^(.*) – [E=HTTP_AUTHORIZATION:%1] The httpd-app.conf ended … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)