mod_rewrite > /user/tag1/tag2/tag..?page=1

Posted by user293479 on Stack Overflow See other posts from Stack Overflow or by user293479
Published on 2010-03-22T22:21:17Z Indexed on 2010/03/23 16:13 UTC
Read the original article Hit count: 588

Filed under:

I am trying to use mod_rewrite to pretty up a URL.

I want the URL to look like this:

http://example.com/bart/school?page=2

and the rewritten URL to be:

http://localhost:8080/app?user=bart&tag1=school&page=2

If possible, I would also like to be able to have more than one tag per user:

http://example.com/bart/school/lisa?page=2

Would look like:

http://localhost:8080/app?user=bart&tag1=school&tag2=lisa&page=2

I far as I can tell this is possible by using mod_rewrite but I can't seem to figure it out. Any help would be really appreciated!

© Stack Overflow or respective owner

Related posts about mod-rewrite