View Single Post
Old 12-23-2009, 01:06 AM   #2 (permalink)
delayedinsanity
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

The first problem is probably that you're capturing three groups, and only returning two.

php Code:
RewriteCond %{HTTP_HOST} ^avatar.domain.tld$ [NC]
RewriteRule ^/([_0-9a-zA-Z-]+/)?([_0-9a-zA-Z-]+/)?([^.]+\.[A-Za-z]{3,4})$ http://www.domain.tld/avatar/$1$2$3
 

I don't know your specific needs, so I just wrote it based off your existing rules. This should grab any address from http://avatar.domain.tld/something/s.../something.ext and find the actual file at http://www.domain.tld/avatar/somethi.../something.ext (untested). Modify to suit your needs. :)
delayedinsanity is offline  
Reply With Quote