index.php?

New to mod_rewrite? This is a good place to start.

index.php?

Postby kharr » Wed Sep 24, 2003 1:00 pm

After spending countless days and hours on this I finally decided to suck it up and leave a post. I hate to admit defeat, but a little help wouldn't hurt either.

Following is an example of how a page is accessed on my web site:

domain.com/index.php?Photo+Gallery/Michael
domain.com/?Photo+Gallery/Michael

What I would like to do is:

1. remove the ? entirely
2. replace the + with an _
3. add .htm to the end (not neccessary, but it would be nice)

The following all point to the same page, which is fine:
domain.com/?
domain.com/index.php?
domain.com/?Welcome
domain.com/

Some common rules:
There is never more than one ?
+ and / may be scattered throughout the URL

domain.com/?Photo+Gallery/Michael
would be just as common as
domain.com/?Photo/Michael+Smith+Jr/Wedding+Day/Tues/Have+Fun

It would be nice if the above example would resolve to:
domain.com/Photo/Michael_Smith_Jr/Wedding_Day/Tues/Have_Fun.htm

Which is what I have been beating my head against the wall trying to figure out for days now with no luck at all. Any help would be much appreciated :smile2:

Thanks
kharr
 
Posts: 1
Joined: Wed Sep 24, 2003 11:21 am

Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 21 guests

cron