NYCPHP Meetup

NYPHP.org

[nycphp-talk] Help with a basic mod_rewrite issue?

csnyder chsnyder at gmail.com
Fri Dec 15 18:10:32 EST 2006


On 12/15/06, Kenneth Downs <ken at secdat.com> wrote:
>
> What I'm looking for is for a URL like this:
>
> http://www.example.com/path/path/somefile.mp3
>
> to become:
>
> http://www.example.com/path/path/index.php?gp_page=media&file=somefile.mp3
>
> Can anybody give me a clue here?  Thanks.
>

No clues on Friday. The following is completely off the top of my head
and probably won't work, but maybe it will lead you to something that
does?

RewriteRule ^/path/path/(.*mp3)$ /path/path/index.php?blah&file=$1

When debugging rewrite issues, use of RewriteLog and RewriteLogLevel 3
are invaluable.

-- 
Chris Snyder
http://chxo.com/



More information about the talk mailing list