Robert Brax
Robert Brax

Reputation: 7318

Failing htaccess clen redirect

Going to: http://localhost:3000/rr/uu with:

 RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)$ index.php?param=$1&param2=$2

Works.

Adding just a parameter:

RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)$ index.php?param=$1&param2=$2&param3=$3

and going to :

http://localhost:3000/rr/uu/gg

result in Not Found apache error message. Why ?

Upvotes: 1

Views: 16

Answers (1)

Amit Verma
Amit Verma

Reputation: 41219

Your rule needs 3 capture groups, try :

RewriteRule ^([^/]+)/?(.*)/?(.*)/?$ /index.php?perm=$1&perm2=$1&perm3=$3 [L]

Upvotes: 1

Related Questions