Forum Moderators: phranque
[edited by: phranque at 10:52 am (utc) on Jun 21, 2023]
[edit reason] please use example.com [/edit]
[edited by: not2easy at 4:20 pm (utc) on Jun 21, 2023]
[edit reason] anonymized per forum charter [/edit]
[edited by: not2easy at 4:22 pm (utc) on Jun 21, 2023]
[edit reason] anonymized per forum charter [/edit]
which uses a 15KB .htaccess, including rewriting rules for multi-languagesThat's not an unreasonable size for htaccess. (I just checked mine. The biggest site's htaccess is 18K; the shared htaccess is 20k. Definitely doesn't take the server 60 seconds to read them!) The main cause for htaccess-related delay is that it exists at all--or rather, that it is allowed to exist. The moment the server finds a single AllowOverride directive in the config file for the relevant directory, it has to check for htaccess on every request, even if it was in the same directory two picoseconds ago and didn't find one then.
But how to know whether they request root directory resources.They don't have to. The question is whether /forums/ is in a directory that's physically located inside the same directory as the site root.
is the access log a DoS attack which makes the dashboard very slow?Did you mean, does the quoted line from access logs indicate a DDoS attack? (“DOS attack” creates a pretty droll mental picture.) Only if the line you quote is one of hundreds of requests in rapid succession. Otherwise it's just a robot sending an autoreferer under the (mistaken) belief that this will make them less noticeable.
[edited by: not2easy at 4:38 pm (utc) on Jun 21, 2023]
That appears to be a forum user looking up a user profile.In the quoted line, the referer is identical to the request. (I saw this thread before it was exemplified.) That's what made me jump straight to “robot with autoreferer”. In context it is generally easy to tell, because humans will request supporting files belonging to the page, while robots rarely do.
# BEGIN WordPress
<IfModule mod_rewrite.c> blah blah blah </IfModule>
# END WordPress - correct? And it does not need the NC flag that makes the server check every possible combination like eXAmpLe or ExAMpLe to process the rule.In fact [NC] in this situation creates a teeny bit of extra work for the server, because then on every non-root request it first flattens the requested URL, even though the rule doesn't care what case it is.
RewriteCond %{HTTPS} !on [OR]
RewriteCond %{HTTP_HOST} !^example\.com$
It is not 'Options' that makes the difference, Inherit is one of the things you can control using Options, but it is not the 'only' Option you might see in a .htaccess file.Are you sure you’re not conflating Options--a core setting that can only be used in <Directory> sections of the config file--with RewriteOptions--a mod_rewrite directive that can be used in htaccess?
It is not 'Options' that makes the difference, Inherit is one of the things you can control using Options, but it is not the 'only' Option you might see in a .htaccess file.
So I check the error log of Apache and PHP FPM:
When I rename .htaccess, it seems some existing PHP requests will be cancelled.