![]() |
.htaccess, rewriting url
I've been trying to rewrite my url to do the following.
I've got a file (image) stored in /gallery/media/avatar/n/r/ and the filename respawn.jpg. Through .htaccess, I would like to aproach the URL through this url: http://avatar.domain.tld/n/r/respawn.jpg The question is, how? My script keeps rewriting the URL. I can aproach it, but the URL changes upon find. PHP Code:
I followed some instructions on http://corz.org/serv/tricks/htaccess2.php, perhaps someone can use it. Looking forward to some responses. ReSpawN |
The first problem is probably that you're capturing three groups, and only returning two.
php Code:
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. :) |
| All times are GMT. The time now is 07:36 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0