101010.pl is one of the many independent Mastodon servers you can use to participate in the fediverse.
101010.pl czyli najstarszy polski serwer Mastodon. Posiadamy wpisy do 2048 znaków.

Server stats:

475
active users

#mod_rewrite

0 posts0 participants0 posts today
My name is Gordo (not really)<p>Can someone please explain to me why an Apache mod_rewrite rule would apply in Chrome, but not in Firefox? Basically, I'm taking the requested subdomain, e.g. [something].mywebsite.com, and using that string to 301 redirect to mywebsite.com/[something]. Works perfectly in Chrome, but hasn't worked in Firefox in a while (first version worked in both, but I had to reimplement it after a WordPress update overwrote it) and I have no idea why that should be a thing. We basically have zero Firefox users attempting to use the subdomain aside from myself, so it doesn't *really* matter, but I just want to understand (and avoid an unnecessary customer service email in the event that a Firefox user scans the QR code and erroneously ends up at the homepage; yes, the subdomain was a mistake. But the QR codes are out there by the thousands, so it's too late for me now lol).</p><p>I should say that the majority of my mod_rewrite experience was probably a decade or so ago, so I'm definitely pretty rusty.</p><p>The rule:</p><p>RewriteCond %{HTTP_HOST} ^(?!www\.)([^.]+)\.(mywebsite\.com)$ [NC]<br>RewriteRule ^ http://%2/%1%{REQUEST_URI} [L,R=301,NE]</p><p><a href="https://hachyderm.io/tags/apache" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>apache</span></a> <a href="https://hachyderm.io/tags/mod_rewrite" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mod_rewrite</span></a> <a href="https://hachyderm.io/tags/server" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>server</span></a></p>
Beat Bolli :kt_be:<p>So this should get rid of the bots:</p><p> # Deny bots<br> RewriteCond %{HTTP_USER_AGENT} "[Bb]ot/|meta-externalagent"<br> RewriteRule .* - [G]</p><p><a href="https://swiss.social/tags/apache" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>apache</span></a> <a href="https://swiss.social/tags/mod_rewrite" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mod_rewrite</span></a></p>
ajaxStardustLong post
ajaxStardust<p>This is where I am w/ the github repo <span class="h-card" translate="no"><a href="https://social.vivaldi.net/@zombiewarrior" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>zombiewarrior</span></a></span> </p><p>It's really close to being "right", so to speak. </p><p>compare that to e.g. <br><a href="http://statecollegeguitarlessons.com/adb/index.php" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">http://</span><span class="ellipsis">statecollegeguitarlessons.com/</span><span class="invisible">adb/index.php</span></a></p><p>Note: my server is <a href="https://social.vivaldi.net/tags/LiteSpeed" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>LiteSpeed</span></a> and i don'[t mess w/ it. But, that should not have the /public/ in the URL. If you've ever worked w/ <a href="https://social.vivaldi.net/tags/laravel" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>laravel</span></a> it's like the ./index.php of the proj dir there. where there's ./index.php "reditrecting" to ./public/index.php <br>but you need to mod the <a href="https://social.vivaldi.net/tags/NGINX" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NGINX</span></a> server {} location {} stuff for the... mod_rewrite type stuff. <br>i.e. the URL should be .com/giterator/ , accomplished in nginx w/ "@alias"<br>(sans the ./public part). you see the same thing either way. pet peeves. </p><p>EDIT: ALSO! CORRECTION -do NOT see the same! ARGGH! w/out that <a href="https://social.vivaldi.net/tags/mod_rewrite" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mod_rewrite</span></a> bit <a href="https://social.vivaldi.net/tags/htaccess" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>htaccess</span></a> whatever!~ the <a href="https://social.vivaldi.net/tags/CSS" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CSS</span></a> <a href="https://social.vivaldi.net/tags/asset" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>asset</span></a> paths mess up as well. Prob explains the missing SVG (masthead.php) forgot about that. oh well. hey. gimme a damn break! brain damage!<br>SEE "new" version here, ( i can fix that path thing. i forget the quick path top of my head momentarily. i prefer to be correct instead, anyway!) <br>this is NOT correct! <a href="http://statecollegeguitarlessons.com/giterator/public/index.php" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">http://</span><span class="ellipsis">statecollegeguitarlessons.com/</span><span class="invisible">giterator/public/index.php</span></a></p><p>first time w/ the <a href="https://social.vivaldi.net/tags/namespace" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>namespace</span></a> <a href="https://social.vivaldi.net/tags/php8" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>php8</span></a> <a href="https://social.vivaldi.net/tags/composer" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>composer</span></a> <a href="https://social.vivaldi.net/tags/autoloader" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>autoloader</span></a> <a href="https://social.vivaldi.net/tags/PSR4" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PSR4</span></a> <a href="https://social.vivaldi.net/tags/MVC" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>MVC</span></a> <a href="https://social.vivaldi.net/tags/refactoring" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>refactoring</span></a>. </p><p>i must admit, it was more challenging that i expected. </p><p>but yea. feel free to hop in there at any time, and help me polish that old turd already!<br>Sheesh!</p>