Need help with a rewrite

Discuss practical ways rearrange URLs using mod_rewrite.

Need help with a rewrite

Postby kaspar » Wed Aug 24, 2005 8:13 am

I have this in httpd.conf:

Code: Select all
RewriteEngine on
RewriteCond %{HTTP_HOST}                   !^blog\.mysite\.com [NC]
RewriteCond %{HTTP_HOST}                   !^www\.mysite\.com [NC]
RewriteCond   %{HTTP_HOST}                 ^(www\.)?([^\.]+)\.mysite\.com$
RewriteCond ^www\.mysite\.com/members/%2   !-d
RewriteRule   ^(.*)$  /members/%2/$1 [L]


This works fine for creating subdomains on the fly. But now, thanks to iTunes 4.9, we need to rewrite URLs like this:

http://user.mysite.com/load.mp3?f=goodMusic.mp3

to this:

http://user.mysite.com/load.php?f=goodMusic.mp3

How can I do it? I've read 100s of posts and tried dozens of
RewriteRule possibilities. Most still give me a 404 error and a
few even prevented the Apache server from restarting until I
removed them!

Please help me!

TIA
kaspar
 
Posts: 1
Joined: Tue Aug 23, 2005 5:56 pm

Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 36 guests

cron