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
When I refresh the error page, it just refreshes. If the rule has been put in the correct place in the .htaccess file (ie. near the top of the file before the existing WordPress code block) then you shouldn’t be seeing an “error page” at all (if the redirect occurred correctly). (If you place this … Read more
htaccess file prevents js scripts to run
Take a look at your wp-config.php file. For a subdomain installation, you should have something like this: define(‘MULTISITE’, true); define(‘SUBDOMAIN_INSTALL’, true); define(‘DOMAIN_CURRENT_SITE’, ‘rareteas.com’); define(‘PATH_CURRENT_SITE’, “https://wordpress.stackexchange.com/”); define(‘SITE_ID_CURRENT_SITE’, 1); define(‘BLOG_ID_CURRENT_SITE’, 1); If you have SUBDOMAIN_INSTALL set to false, change it to true, which is necessary for a subdomain multisite. Next, take a look at your database. Sometimes … Read more
solved it actually the directories need 0755
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
Recommend using htaccess to take care of SSL redirects as needed. Will prevent ‘mixed content’ errors. I don’t think WP does any redirects, other than to get the content. If your settings have non-SSL, that’s what people will get. Using htaccess will prevent problems.
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
Have you considered to create a symlink from your document root (wordpress) directory to the directories in upper levels? You’ll need to uncheck the “Restrict the ability to follow symbolic links” checkbox in Plesk Hosting & DNS > Apache & Nginx Settings for that to work.