We help IT Professionals succeed at work.

modrewrite question?

scottg
scottg asked
on
Medium Priority
210 Views
Last Modified: 2010-03-04
I simply want to rewrite all requests to

http://test.domain.com/file.gif

to

http://www.domain.com/ftp/file.gif

where hits to www.domain.com are left alone. Also, can this not be an external redirect and just serverd as http://test.domain.com/file.gif even know its actually at http://www.domain.com/ftp/file.gif

Comment
Watch Question

Commented:
<VirtualHost test.domain.com>
# ...
RewriteEngine on
RewriteRule ^/(file.gif) http://www.domain.com/ftp/$1 [P]
# [P] flag requires that mod_proxy is included into Apache
# (via LoadModule or at compile time)
# ...
</VirtualHost>

Or, just make test.domain.com's DocumentRoot point to /ftp
inside www.domain.com's DocumentRoot...

Explore More ContentExplore courses, solutions, and other research materials related to this topic.