https multiple redirects

This is somewhat of a guess, but it is probably a result of the web server configuration. What your server probably does is to see that the request want to load the blog url of the site. It checks out and sees that blog is a directory adds a slash and redirects to it. Now … Read more

How to Redirect huge numbers of URLs to another URLs?

If /seba-online-form-fill-up-2018.html is an actual WordPress URL then this is relatively trivial to do in .htaccess. For example, the following one-liner using mod_rewrite could be used. This should be placed before the existing WordPress directives in .htaccess: RewriteRule ^\d{4}/\d{1,2}/(.+\.html)$ /$1 [R=302,L] This redirects a URL of the form /NNNN/NN/<anything>.html to /<anything>.html. Where N is a … Read more

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