tekwav Posted January 1, 2020 CID Share Posted January 1, 2020 When i click on My Results, i get a 404 Not Found error message. Link to comment Share on other sites More sharing options...
CA3LE Posted January 1, 2020 CID Share Posted January 1, 2020 I need to take a little time to figure out and understand why that's happening specifically for your results and not others. Every other member I try works. To clarify the situation, when was the last time you pulled up your results? Was this working fine before today? Here's an alternative link to your results while I investigate the issue. tekwav's results I've never seen this happen and I've visited tens of thousands of member result links over the years. If it were more widespread I'd think it was a mod_rewrite issue. To test anyway I created an unrelated rule and got the same result. But when I visit the path that the rule is forwarding to... it works, no problem. I also reset apache and nginx in case there was something happening there. Still 404. You've been a member since 2013 and have hundreds of results saved so I assume it's been working up until recently. This has to be one of the most baffling bugs I've ever seen. No joke. It would make more sense if your username had an odd character in it or something. I'll update this thread when I have more information Link to comment Share on other sites More sharing options...
CA3LE Posted January 1, 2020 CID Share Posted January 1, 2020 This is so weird! Here's the rules I'm testing. RewriteRule ^statstest/tekwav$ /tools/database/db_search.php?type=user_name&q=tekwav [L,QSA] RewriteRule ^statstest/tekwav.$ /tools/database/db_search.php?type=user_name&q=tekwav [L,QSA] RewriteRule ^statstest/.tekwav$ /tools/database/db_search.php?type=user_name&q=tekwav [L,QSA] RewriteRule ^statstest/.tekwav.$ /tools/database/db_search.php?type=user_name&q=tekwav [L,QSA] So they are all pointing the the same destination. https://testmy.net/statstest/tekwav -- 404 not found https://testmy.net/statstest/tekwav. -- 200 works https://testmy.net/statstest/.tekwav -- 404 not found https://testmy.net/statstest/.tekwav. -- 200 works They should all work. I went directly to the server IP and had the same result, so it's definitely not cloudflare. lol... I think it's because your username ends in wav ... like a wav file. This probably boils down to a poorly written expression in nginx additional directives. Here's why I have this theory. RewriteRule ^statstest/.ekwav$ /tools/database/db_search.php?type=user_name&q=tekwav [L,QSA] -- 404 not found RewriteRule ^statstest/t.kwav$ /tools/database/db_search.php?type=user_name&q=tekwav [L,QSA] -- 404 not found RewriteRule ^statstest/te.wav$ /tools/database/db_search.php?type=user_name&q=tekwav [L,QSA] -- 404 not found RewriteRule ^statstest/tek.av$ /tools/database/db_search.php?type=user_name&q=tekwav [L,QSA] -- 200 works RewriteRule ^statstest/tekw.v$ /tools/database/db_search.php?type=user_name&q=tekwav [L,QSA] -- 200 works RewriteRule ^statstest/tekwa.$ /tools/database/db_search.php?type=user_name&q=tekwav [L,QSA] -- 200 works results in https://testmy.net/statstest/.ekwav -- 404 not found https://testmy.net/statstest/t.kwav -- 404 not found https://testmy.net/statstest/te.wav -- 404 not found https://testmy.net/statstest/tek.av -- 200 works https://testmy.net/statstest/tekw.v -- 200 works https://testmy.net/statstest/tekwa. -- 200 works As I iterate through, as soon as the URL it no longer ends in "wav" it works. Now the rule is supposed to be looking for .wav not wav Here's the culprit. In nginx additional directives. location ~* .(js|jpg|jpeg|gif|css|tgz|gz|rar|bz2|doc|pdf|ppt|tar|wav|bmp|rtf|swf|ico|flv|txt|woff|woff2|svg|json)$ { etag on; if_modified_since exact; add_header Pragma "public"; add_header Cache-Control "max-age=31536000, public"; } To further test the theory that this is the culprit I add additional test rules to my .htaccess (mod_rewrite) We'll pretend a new member has a name ending in doc and tgz -- then test with one character blocking the pattern I suspect is being detected. RewriteRule ^statstest/tekdoc$ /tools/database/db_search.php?type=user_name&q=tekwav [L,QSA] RewriteRule ^statstest/tekdo.$ /tools/database/db_search.php?type=user_name&q=tekwav [L,QSA] RewriteRule ^statstest/tektgz$ /tools/database/db_search.php?type=user_name&q=tekwav [L,QSA] RewriteRule ^statstest/tektg.$ /tools/database/db_search.php?type=user_name&q=tekwav [L,QSA] https://testmy.net/statstest/tekdoc -- 404 not found https://testmy.net/statstest/tekdo. -- 200 works https://testmy.net/statstest/tektgz -- 404 not found https://testmy.net/statstest/tektg. -- 200 works Still, I don't see a mistake in how that nginx directive is written. That should only capture if it has a preceding period. I'll have to think about this. Obviously I can just remove that rule and it will work but I have it there for a reason. Maybe I simply need to remove the leading period and then add it to each. Like this... (update: nevermind, same result) Yup, without that nginx directive it works. I'll try to understand why it's not working as expected and rewrite that directive and post it here for other webmasters. spenceteeth 1 Link to comment Share on other sites More sharing options...
spenceteeth Posted January 4, 2020 CID Share Posted January 4, 2020 working now. good job Cable CA3LE 1 Link to comment Share on other sites More sharing options...
Recommended Posts