DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 15th September 2019
notooth notooth is offline
Shell Scout
 
Join Date: Jul 2015
Posts: 125
Talking Need help with httpd rewrite rule

Hello,

Can anyone give me an httpd rule that rewrite the location http://localhost/node/1 to http://localhost/index.php/node/1 ?
Reply With Quote
  #2   (View Single Post)  
Old 15th September 2019
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 472
Default

I can't give the exact rule, off hand, but this gives a good example:
Quote:
from: https://man.openbsd.org/httpd.conf
Code:
The request can also be rewritten with the request rewrite directive:

server "example.com" {
	listen on * port 80
	location match "/old/(.*)" {
		request rewrite "/new/%1"
	}
So my guess is yours would be something like:
Code:
location match "/http://localhost/node/1/(.*)" {
		request rewrite "/http://localhost/index.php/node/1/%1"
	}
There is additional examples here: https://undeadly.org/cgi?action=arti...20180621064643
Maybe it will take some trial and error attempts on your system, and that is why I can not say exactly, I would have to try it, and see, maybe later when I have more time I can test it.
__________________
My best friends are parrots
Reply With Quote
  #3   (View Single Post)  
Old 15th September 2019
notooth notooth is offline
Shell Scout
 
Join Date: Jul 2015
Posts: 125
Default

Thank you
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
pf NAT rule isn't working flit OpenBSD Security 8 30th September 2013 02:45 AM
Help with my pf rule please whispersGhost OpenBSD Security 0 19th April 2012 07:54 AM
PF rule to disable icmp? cyanide_christ OpenBSD Security 6 15th October 2009 05:35 AM
pf: why is that rule not working? ivanatora FreeBSD General 14 11th December 2008 09:32 AM
fdisk -B does not rewrite the mbr kasse NetBSD General 0 25th November 2008 11:07 PM


All times are GMT. The time now is 06:06 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick