How to set 301 redirection after moving WordPress blog?

WAY #1 – cPanel I assume your host is using cPanel managing your Server. Browse domainname.com/cpanel, login their with cPanel credential: Change the values according the following image: Don’t forget to check the “Wildcard Redirect” to redirect all the subfolder/subpages also (Thanks to @RobertHue). Add the redirection and you are done. WAY #2 – .htaccess … Read more

.htaccess Security Header Rules

The RewriteEngine On line (as you have indicated) isn’t necessary, and pertains to a different module, mod_rewrite. You should remove it from the mod_headers block. It’s possible that you don’t have the Headers Apache module installed or activated on your host. If it is possible to run the test with some breakage, you could try … Read more

WordPress Redirecting Non Category Pages /page/nnn to their Canonical URLs

This is by design and intentional. WordPress rewrites have become increasingly complex over the years, and many plugins utilise the page endpoint for a page (usually with a template and custom query) – redirecting introduces a potential world of pain. Long story short, it doesn’t matter anyway. WordPress adds <link rel=”canonical /> for pages, so … Read more

How do I host WordPress on a hidden domain through a reverse proxy?

To ensure your content isn’t crawled from the hidden admin DOMAIN you could include something like this in your .htaccess file. RewriteEngine On #Force traffic to production URL RewriteCond %{HTTP_HOST} !xxxx.com$ [NC] RewriteRule (.*) http://www.xxxx.com/guides/%{REQEUST_URI} [R=301,L] There is more than one way to handle this first redirect so your code may work too (didn’t test … Read more

Override 404 page with htaccess

As far as I can see, it is not possible to use a custom 404 ErrorDocument directive in your htaccess file because WordPress’ index.php will always be found when processing the htaccess content. (unless ofcourse index.php got deleted for some reason) Because index.php is found, it will not trigger the ‘404 not found’ ErrorDocument directive. … Read more

How to hide login form if basic authentication fails?

Managed to figure it out and want to share it with others in case they’re having the same issue. When protecting wp-admin, protect it using wp-admin/.htaccess file, but that only works for the wp-admin directory, and won’t affect the wp-login.php file which is outside that directory. Add protection to the wp-login.php file using the <files></files> … Read more

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