mal ne frage zu php und mod-rewrite

Apache, Lighttpd, nginx, Cherokee
sonic
Posts: 44
Joined: 2002-12-04 08:46
Location: Leverkusen
 

mal ne frage zu php und mod-rewrite

Post by sonic »

hallo gemeinde,

zur zeit habe ich ein system, welches diverse datanbankinhalte und allerlei andern kram anhand von ?action=wert macht.

wert ist immer der name der aktuellen seite, jetzt würde ich gern etwas mod-rewriteln, erstmal sollen alle aufrufe aus jedem unterordner auf die index.php geleitet werden.

die aufgerufene direcory soll dann der wert von ?action= werden.
User avatar
Joe User
Project Manager
Project Manager
Posts: 11185
Joined: 2003-02-27 01:00
Location: Hamburg
 

Re: mal ne frage zu php und mod-rewrite

Post by Joe User »

Quick&Dirty, bitte selbst anpassen und debuggen:

Code: Select all

RewriteRule /(.*)/   index.php?action=$1 [L,QSA]
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
sonic
Posts: 44
Joined: 2002-12-04 08:46
Location: Leverkusen
 

Re: mal ne frage zu php und mod-rewrite

Post by sonic »

leider bekomme ich es nicht hin, bitte nochmal um hilfe. :-(
simcen
Posts: 333
Joined: 2003-02-12 14:35
Location: Bern, Schweiz
 

Re: mal ne frage zu php und mod-rewrite

Post by simcen »