home.social

#htaccess — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #htaccess, aggregated by home.social.

fetched live
  1. Running a website on Apache, perhaps with shared hosting?

    Then you probably have redirects set up.

    Do you check them on broken targets?

    If not, here’s an optimization tool for you 🙂

    Use .htaccess Punk: npx htaccess-punk

    It couldn’t be easier to use (says the author):

    npmjs.com/package/htaccess-punk

    😉

    #htaccess #redirects #apache #linkrot

  2. Running a website on Apache, perhaps with shared hosting?

    Then you probably have redirects set up.

    Do you check them on broken targets?

    If not, here’s an optimization tool for you 🙂

    Use .htaccess Punk: npx htaccess-punk

    It couldn’t be easier to use (says the author):

    npmjs.com/package/htaccess-punk

    😉

    #htaccess #redirects #apache #linkrot

  3. Как подружить .htaccess файл для популярных CMS с Nginx

    Начну с небольшого вступления: зачем вообще нужен .htaccess файл? .htaccess — это конфигурационный файл, который использует веб‑сервер Apache для задания специфических настроек для каждой отдельной папки сайта. Благодаря ему можно:

    habr.com/ru/articles/1013982/

    #nginx #nginx_module #mod_rewrite #htaccess

  4. Releasing .htaccess Punk—a Quick Helper to Check Redirects in .htaccess Files:

    Have you checked your .htaccess on broken redirects today?

    meiert.com/blog/htaccess-punk/

    #webdev #quality #htaccess #redirects

  5. Releasing .htaccess Punk—a Quick Helper to Check Redirects in .htaccess Files:

    Have you checked your .htaccess on broken redirects today?

    meiert.com/blog/htaccess-punk/

    #webdev #quality #htaccess #redirects

  6. ☕ Fresh updates for all of my #books now available ⚡ New versions feature many improvements, including updated links, new resources, better formatting, and more. As always, book owners can download the latest versions and all extras for FREE 😎 books.perishablepress.com/ #WordPress #webdev #htaccess #sql

    📖 .htaccess made easy
    📖 Digging Into WordPress
    📖 The Tao of WordPress
    📖 Wizard’s SQL Recipes
    📖 WordPress Themes In Depth

  7. ☕ Fresh updates for all of my #books now available ⚡ New versions feature many improvements, including updated links, new resources, better formatting, and more. As always, book owners can download the latest versions and all extras for FREE 😎 books.perishablepress.com/ #WordPress #webdev #htaccess #sql

    📖 .htaccess made easy
    📖 Digging Into WordPress
    📖 The Tao of WordPress
    📖 Wizard’s SQL Recipes
    📖 WordPress Themes In Depth

  8. Now I've updated my .htaccess with the "8G firewall" setup. Results to be seen in a month; I'd expect a lot of these to disappear.
    perishablepress.com/8g-firewal

    #firewall #webmaster #htaccess

  9. Now I've updated my .htaccess with the "8G firewall" setup. Results to be seen in a month; I'd expect a lot of these to disappear.
    perishablepress.com/8g-firewal

    #firewall #webmaster #htaccess

  10. Semrush ist eines der bekanntesten SEO-Analyse-Tools auf dem Markt. Es durchsucht Websites regelmäßig mit seinem Bot (SemrushBot), um Daten wie Keywords, Backlinks, Rankings und vieles mehr von deiner Website zu erfassen und zu analysieren. Hier sind 5 effektive, schnell umzusetzende Methoden, wie du Semrush von deiner Website aussperren kannst. 👇

    teufelswerk.net/semrushbot-blo

    #SEO #semrush #botblocker #bots #website #websecurity #cybersecurity #wordpress #joomla #typo3 #nginx #robotstxt #htaccess

  11. Semrush ist eines der bekanntesten SEO-Analyse-Tools auf dem Markt. Es durchsucht Websites regelmäßig mit seinem Bot (SemrushBot), um Daten wie Keywords, Backlinks, Rankings und vieles mehr von deiner Website zu erfassen und zu analysieren. Hier sind 5 effektive, schnell umzusetzende Methoden, wie du Semrush von deiner Website aussperren kannst. 👇

    teufelswerk.net/semrushbot-blo

    #SEO #semrush #botblocker #bots #website #websecurity #cybersecurity #wordpress #joomla #typo3 #nginx #robotstxt #htaccess

  12. I am struggling to make this work. I have this site structure:
    example.com/index.html
    example.com/blog.html (which servers as an index for my blog)
    example.com/blog/0001.html (a post)
    example.com/blog/0002.html (another post, etc.)

    I'd like that if a visitor types "example.com/blog" then blog.html from the upper folder should be loaded, but I can't find the proper rule(s) to add to an .htaccess file, or where to place it.

    I would also like to avoid moving blog.html to blog/index.html, but I could deal with it.

    Can somebody provide me with proper instructions? I've tried searching with different terms but I don't quite get the answer to my problem, or I am not understanding what they do.

    This is a shared hosting, so modifying httpd.conf is not on the table.

    #sysadmin #htaccess #fedihelp

  13. I am struggling to make this work. I have this site structure:
    example.com/index.html
    example.com/blog.html (which servers as an index for my blog)
    example.com/blog/0001.html (a post)
    example.com/blog/0002.html (another post, etc.)

    I'd like that if a visitor types "example.com/blog" then blog.html from the upper folder should be loaded, but I can't find the proper rule(s) to add to an .htaccess file, or where to place it.

    I would also like to avoid moving blog.html to blog/index.html, but I could deal with it.

    Can somebody provide me with proper instructions? I've tried searching with different terms but I don't quite get the answer to my problem, or I am not understanding what they do.

    This is a shared hosting, so modifying httpd.conf is not on the table.

    #sysadmin #htaccess #fedihelp

  14. To display websites under #YunoHost, a special #My_Webapp application needs to be installed for each configured domain. Okay, I get that. Of course, there are pitfalls, but that's probably inevitable.

    My first attempt with re-form.eu has been a failure so far. But with the knowledge I gained, I managed to get clean-web.org up and running successfully. At least.

    This blog, as you know, relies on #ssi, or #shtml pages. This has to be specifically enabled in the #nginx web server, which I did. I don't know if it's in the right place or in the right way. I have the information from the original nginx documentation, and the server didn't report any errors after reloading. Furthermore, there's an #htaccess file in the web directory that specifies index.shtml as the first file to be launched. Nevertheless, only a 404 page appears.

    I'd be open to suggestions 🤔 #Linux #VPS

  15. Um Webseiten unter #YunoHost anzeigen zu können, braucht es für jede eingerichtet Domain die Installation einer speziellen #My_Webapp Applikation.Na gut, habe ich begriffen. Dass da natürlich Fallstricke lauern, ist wohl unvermeidlich.

    Mein erster Versuch mit re-form.eu ist bislang ein Misserfolg. Mit den Kenntnissen dann aber clean-web.org erfolgreich zum Laufen gebracht. Immerhin.

    Das Blog hier setzt bekanntlich auf #ssi, also #shtml-Seiten. Dies muss im #nginx Webserver extra aktiviert werden, was ich tat. Ob an der richtigen Stelle, in der richtigen Weise, weiß ich nicht. Ich habe die Angaben aus der originalen nginx-Dokumentation und der Server meldete keinen Fehler, nachdem er neu geladen wurde. Zudem existiert im Web-Verzeichnis eine #htaccess-Datei, die index.shtml als zuerst startende Datei vorgibt. Trotzdem erscheint nur eine 404-Seite.

    Ich wäre für Vorschläge empfänglich 🤔 #Linux #VPS

  16. .htaccessでリダイレクトしてはいけないの?

    もう一つの #WordPress サイトのサイトヘルスに「1件の致命的な問題」が指摘されていた。プラグイン #ActivityPub に関するもの。

    1件の致命的な問題

    致命的な問題とは、サイトのパフォーマンスやセキュリティに多大な影響を与える可能性がある項目です。最優先で、これらの問題を解決してください。

    投稿者 URL にアクセスできません

    投稿者 URL の https://hitorinezumi.cloudfree.jp/wp/author/ishii/ は別のページに転送されています。これは通常「Yoast SEO」などの SEO プラグインによって行われます。

    次のページに、次のコードで転送しているのだけど…。

    https://hitorinezumi.cloudfree.jp/wp/ishii/

    Redirect 301 /wp/author/ishii /wp/ishii/

    リダイレクト先は、プラグイン #ActivityPub の投稿者URLではないけれど、リダイレクトすることでどのような問題が生じるのだろう? プラグインを使う方法なら問題ないのはどうして?

    #Htaccess #ActivityPub #WordPress #プラグイン

    https://ishii00141.stars.ne.jp/20250318-1407-1962/

  17. How to Shorten any URL with Apache/.htaccess (Rewriting vs. Redirecting) htaccessbook.com/shorten-url #Apache #htaccess

  18. How to Shorten any URL with Apache/.htaccess (Rewriting vs. Redirecting) htaccessbook.com/shorten-url #Apache #htaccess

  19. Protecting your blog from the dead eyed #AI crawlers. You can experiment with specific robots txt, and I also run a script in htaccess. I think there are metadata properties you can declare. None of this stops your pages being crawled but may afford some legal protection. (See the German Laion case recently). I'm doing a short blogpost on this, soon.

    #robotstxt #aicrawlers #htaccess

  20. Protecting your blog from the dead eyed #AI crawlers. You can experiment with specific robots txt, and I also run a script in htaccess. I think there are metadata properties you can declare. None of this stops your pages being crawled but may afford some legal protection. (See the German Laion case recently). I'm doing a short blogpost on this, soon.

    #robotstxt #aicrawlers #htaccess

  21. Can anyone out there help me with an #htaccess issue?

    Ill explain the problem, this will most likely go over a few posts!

    I have a page with a blog on it, the blog post URL's are rewritten to make them cleaner using a pretty standard bit of code...

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule rooms/(.*) /rooms/index.php?post=$1 [L,NC,QSA]

    This works nicely, it turns /rooms/?post=inis-deala into rooms/inis-deala. All good.

    Cont/

  22. Can anyone out there help me with an #htaccess issue?

    Ill explain the problem, this will most likely go over a few posts!

    I have a page with a blog on it, the blog post URL's are rewritten to make them cleaner using a pretty standard bit of code...

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule rooms/(.*) /rooms/index.php?post=$1 [L,NC,QSA]

    This works nicely, it turns /rooms/?post=inis-deala into rooms/inis-deala. All good.

    Cont/

  23. Anybody willing to help with #htaccess issue? I'm trying to redirect my /blog/ subfolder to blog.devlord.io new #Jekyll pages

  24. Anybody willing to help with #htaccess issue? I'm trying to redirect my /blog/ subfolder to blog.devlord.io new #Jekyll pages

  25. This is where I am w/ the github repo @zombiewarrior

    It's really close to being "right", so to speak.

    compare that to e.g.
    statecollegeguitarlessons.com/

    Note: my server is #LiteSpeed and i don'[t mess w/ it. But, that should not have the /public/ in the URL. If you've ever worked w/ #laravel it's like the ./index.php of the proj dir there. where there's ./index.php "reditrecting" to ./public/index.php
    but you need to mod the #NGINX server {} location {} stuff for the... mod_rewrite type stuff.
    i.e. the URL should be .com/giterator/ , accomplished in nginx w/ "@alias"
    (sans the ./public part). you see the same thing either way. pet peeves.

    EDIT: ALSO! CORRECTION -do NOT see the same! ARGGH! w/out that #mod_rewrite bit #htaccess whatever!~ the #CSS #asset paths mess up as well. Prob explains the missing SVG (masthead.php) forgot about that. oh well. hey. gimme a damn break! brain damage!
    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!)
    this is NOT correct! statecollegeguitarlessons.com/

    first time w/ the #namespace #php8 #composer #autoloader #PSR4 #MVC #refactoring.

    i must admit, it was more challenging that i expected.

    but yea. feel free to hop in there at any time, and help me polish that old turd already!
    Sheesh!

  26. This is where I am w/ the github repo @zombiewarrior

    It's really close to being "right", so to speak.

    compare that to e.g.
    statecollegeguitarlessons.com/

    Note: my server is #LiteSpeed and i don'[t mess w/ it. But, that should not have the /public/ in the URL. If you've ever worked w/ #laravel it's like the ./index.php of the proj dir there. where there's ./index.php "reditrecting" to ./public/index.php
    but you need to mod the #NGINX server {} location {} stuff for the... mod_rewrite type stuff.
    i.e. the URL should be .com/giterator/ , accomplished in nginx w/ "@alias"
    (sans the ./public part). you see the same thing either way. pet peeves.

    EDIT: ALSO! CORRECTION -do NOT see the same! ARGGH! w/out that #mod_rewrite bit #htaccess whatever!~ the #CSS #asset paths mess up as well. Prob explains the missing SVG (masthead.php) forgot about that. oh well. hey. gimme a damn break! brain damage!
    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!)
    this is NOT correct! statecollegeguitarlessons.com/

    first time w/ the #namespace #php8 #composer #autoloader #PSR4 #MVC #refactoring.

    i must admit, it was more challenging that i expected.

    but yea. feel free to hop in there at any time, and help me polish that old turd already!
    Sheesh!

  27. To webadmins out there: remember to test your .htaccess files. One easy way to check is on this online website, if its contents isn't sensitive:

    htaccess.madewithlove.com

    To test the regular expressions included in a mod_rewrite, there's this website that even has a stepping debugger:

    regex101.com

    #webadmin #sysadmin #htaccess #modrewrite

  28. @mlanger @mrbadger42 @Sheril

    Of course. There are many examples online, here is my .htaccess:

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(albert|www)\.rierol\.net/.*$ [NC]
    RewriteRule \.(jpg|png|jpeg|gif)$ - [F]

    Means:
    Line 1: switch on.
    Line 2: calling page can't be nothing.
    Line 3: calling page can't be anything other than my own (sub)domains.
    Line 4: if the file has an image extension, then fail.

    #htaccess #HttpTips #

  29. Performance-Optimierung (GZIP, Caching, Expires Header etc.) mit Hilfe der .htaccess

    In diesem Beitrag findet ihr eine Vorlage für die .htaccess-Datei, mit der die Performance einer Website verbessert werden kann.

    kulturbanause.de/blog/performa