2

So I have the main photos folder and I want to make it subdomain style so there is /images/ and /images/thumbs. What I'm trying to accomplish is 'converting'

/images/ -> images.domain.com 

and

/images/thumbs -> thumbs.domain.com 

Thank you for your help.

1 Answer 1

1
RewriteRule ^/?images/thumbs/(.*)$ http://thumbs.domain.com/$1 RewriteRule ^/?images/(.*)$ http://images.domain.com/$1 [L] 

This rules rewrite URLs like: http://domain.com/images/lol.png to http://images.domain.com/lol.png. And: http://domain.com/images/thumbs/lol.png to http://thumbs.domain.com/lol.png. With no external redirect.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks have you tested it? I cant seem to access images.domain.com I also have enabled Options -Indexes does it affect this? Does it work on a typical shared server (im using HG). Thanks for your time.
I can't test that :-D that option has no effect on these rule but both domains should have save server & IP

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.