The Squad Blog
RELATED

HTACCESS Power Moves

Brian Harper

Brian Harper  Aug. 18

0 0

I came into a problem on HarryShearer.com where I wanted a directory on my site to appear to be on the same domain, but load content from another server. So with the magic of Apache, HTACESSS and mod_rewrite I can do just that.

Basically this is taking any request for "/photos" directory and sending that to an external site to get the results. This includes any querystring as well. Remember this the next time you get in a similar jam.

RewriteEngine on
RewriteBase /photos/
RewriteRule ^photos(.*)$ http://externalSite.com/photos$1 [P]
 

Post A Comment

Sorry! Comments are closed.

Want to talk to us? Email us at info@madebysquad.com.