Jeff Starr

✨ How to Redirect URLs with Query Parameters (in-depth/complete guide) htaccessbook.com/redirect-quer #Apache #htaccess

stage7 :windmillTrans:

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

Example Domain

example.com
UmWerker 🕊 ☮️ 🤘

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

UmWerker 🕊 ☮️ 🤘

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

Dummy-X 🇮🇹

🔥 [#OldPost] - C'è un aggiornamento sul blog ⚠️:
XML-RPC è un protocollo che consente la comunicazione tra computer su una rete, permettendo a un programma di eseguire funzioni su un altro computer. Utilizza XML per formattare le richieste e le risposte e HTTP come mezzo di trasporto. In pratica, un client invia una richiesta a un server specificando quale funzione eseguire e con qual...

👉 selectallfromdual.com/blog/147

#️⃣ #altervista #htaccess #wordpress #xmlrpc

Abilitare XML-RPC per WordPress su Altervista

Come sbloccare XML-RPC su Altervista per utilizzare…

DUMMY-X
Pasquale 📷 🇫🇷 🦻

Mettons que dans mon #htaccess, j'ai :

RewriteRule ^(.*)/$ /index.php?page=$1 [L]

Mettons que j'ai un répertoire /myfolder/, avec des sous répertoires, voire des sous sous répertoires que je ne veux pas redirigé vers index, et que ce répertoire /myfolder/ a son propre htaccess, et bien... euh... comment je fais pour dire au htaccess de la racine de laisser peinard /myfolder/, ses déclinaisons et son htaccess ?

J'ai bien trouvé ça :
stackoverflow.com/questions/18

mais ça marche pas.
J'ai mis les règles du htaccess de /myfolder/ dans le htaccess de la racine, mais ça marche pas.
une idée ?

.htaccess mod_rewrite - how to exclude directory from rewrite rule

I have 8 lines of rewrite rules in my .htaccess file.…

Stack Overflow
Dr Pen

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

Steve B

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/

Aaron Lord :csharp:

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

🪑Dr Rockstar ♫

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!

Dec 15, 2024, 12:08 · · · 0 · 0
Shamar

What is the correct way to configure .htaccess to send all requests to a unix domain socket?

Ivtried variour enchantement with mod_proxy and mod_rewrite without success.

.htaccess only because I want it to work on shared hostings.

Also, what about NON php fcgi?
I couldn't even get it working with mod_proxy_cgi (again, .htaccess only). The receiving server is up and running, listening at the destination UDS.

Am I missing something obvious?

#askfedi #fedihelp #apache #htaccess #unix

Steve B

Any htaccess file experts here?

Need a bit of help!

#htaccess #coding #php #webdev

Uwe

Frage an #website Betreiber

Nutzt Ihr #Geoblocking per #htaccess oder andere Methoden (falls ja, welche) um Euch die lästigen Arschkrampen dieser Welt, die einem nur auf den Senkel gehen wollen, wenigstens teilweise vom Hals zu halten?

Dummy-X 🇮🇹

⌨️ Personalizzare la favicon e l'icona di Dokuwiki elegantemente
Come modificare le icone grafiche dell'installazione del wiki grazie ad una semplice modifica dell'.htaccess...

👉 selectallfromdual.com/blog/137

#️⃣ #dokuwiki #htaccess

Personalizzare la favicon e l’icona di Dokuwiki elegantemente

Come modificare le icone grafiche dell'installazione…

DUMMY-X
Albert Cardona

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

htaccess tester ♥ madewithlove

Easily test your htaccess rewrite rules

htaccess.madewithlove.com