1

I have these rules:

RewriteRule ^farbe-([^-]*)/$ ?farbe=$1 [L]
RewriteRule ^marke-([^-]*)/$ ?marke=$1 [L]

So http://playscout.de/hosen/?marke=diesel/ and http://playscout.de/hosen/?farbe=blau/ becomes http://playscout.de/hosen/marke-diesel/ and http://playscout.de/hosen/farbe-blau/

It works, but i need rules for multiple parameters like http://playscout.de/hosen/marke-diesel/farbe-blau/ so i tryed this for farbe:

RewriteRule ^farbe-([^-]*)/$ &farbe=$1 [L]

Because from second delimeter it have to be &

But it doesn't work. Any suggestions?

1 Answer 1

2

Put rule in top, to be executed first:

RewriteRule ^marke-([^-]*)/farbe-([^-]*)/$ ?marke=$1&farbe=$2 [L]
Sign up to request clarification or add additional context in comments.

2 Comments

For further parameter like page it would be: RewriteRule ^marke-([^-]*)/farbe-([^-]*)/page-([^-]*)/$ ?marke=$1&farbe=$2&page=$3 [L] right?
yes. i don`t know how to make universal expression for any number of parameters. you can dump part of url with parameters in one parameter and parse it in your page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.