Return 403 for specific paths in WordPress
Return 403 for specific paths in WordPress
Return 403 for specific paths in WordPress
is partly wrong in every WordPress .Htaccess hardening article I’ve seen. Unfortunately it is very common for Apache config/regex code snippets to be blindly copy/pasted and errors do propagate. Unless there is some obscure vulnerability we are not aware of then I would bet that that is what has happened here. (Although matching “too much” … Read more
To ensure that your URLs have a consistent trailing slash and avoid duplicate content, you can use the following .htaccess rules. These rules will enforce a single trailing slash for URLs and redirect any URLs without or with multiple trailing slashes to their correct form. Here’s the updated .htaccess code: # Enable rewrite engine RewriteEngine … Read more
I needed the same thing – a ‘landing’ page at the root site that was custom-built (via PHP), but then WordPress-based pages elsewhere. I did it with the htaccess file for the site: # For example.com root, set landing.php as the default page RewriteCond %{HTTP_HOST} ^(www\.)?example\.com$ [NC] RewriteRule ^$ /landing.php [L] This will redirect www.example.com … Read more
The stupidest and fastest way, if you have a source code backup, delete all the previous files and re-upload the backup file.
how to redirect static folder to wordpress page?
*The below only temporarily solves the issues. I ran into the missing header issues was a new cache file was generated. I use several of the plugins you mentioned and recently noticed the same issue which drove me crazy as I manually confirmed that all of the headers were present in the correct files. I … Read more
Allow file access only via cookie
I think that WordPress rules should be wrapped in # BEGIN WordPress Rewrite rules… # END WordPress so maybe you got hacked ?
You can potentially use redirects to achieve this, it may not be the most ideal or stable solution, and could cause problems with your site. This is why you’re seeing a “too many redirects” error. Every time WordPress loads, it checks if the requested URL is supposed to be the admin URL. If not, it … Read more