Similar to "How to get ampersand in unscrambles URL&quo

Discuss practical ways rearrange URLs using mod_rewrite.

Similar to "How to get ampersand in unscrambles URL&quo

Postby fireman949 » Wed Apr 21, 2004 12:30 pm

I have a similar question to This post

I have several pages I want to acomplish this with.

I want
http://www.site.com/members/id/first_last/

to resolve to
http://www.site.com/members.php?id=first_last

There are several other pages that I want to accomplish something similar with. (apparatus.php, incidents.php). I may want to in the future add a second variable (third, forth, etc.).

I'm not as familiar with mod_rewrite as I'd like to be, but I have been testing the solutions proposed in the above link with no success. It's close but for some reason, not re-writing how I want it to.

I'm running my own LAMP server with Apache 2.0.49, is there a 'cut and dry' way to accomplish what I have stated. While I'm taking the time to learn regular expressions it would be nice to have something working that I can play with.

TIA

-fireman
fireman949
 
Posts: 1
Joined: Wed Apr 21, 2004 12:11 pm

Postby Caterham » Fri Dec 10, 2004 1:39 pm

Code: Select all
RewriteEngine On
RewriteRule ^(.+)/(.+)/(.+)/$ $1.php?$2=$3
:P
Bob
Caterham
 
Posts: 690
Joined: Fri Dec 10, 2004 1:30 pm


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 94 guests

cron