• My photography website is www.domain.com and my blog is on www.domain.com/blog.
  • Everything is on self hosted wordpress platform.
  • On my index page I have my photo galleries.
  • I now would like to use a third party service to host my galleries at www.galleries.com/me.

What I would like to achieve:

  • when someone visits www.domain.com it gets redirected 301 to www.galleries.com/me but keeps my domain visible in url address
  • when someone visits www.domain.com/blog everything stays as usual and nothing changes.

What I thought:

  • usa redirect rule PLUS a rewrite rule on my .htaccess


  • Is it possible?
  • How can i do it?
  • How does it affects SEO?

I tried to make it as simple as I could :) Thanks

  • The very definition of a 301 is that the address bar changes. You may be able to get the behavior you want with a reverse-proxy setup (where all connections come to your server, then for certain pages it creates a new connection to galleries.com to fetch the content) - would something like this work for you situation? – Shane Madden Oct 18 '11 at 15:49
  • Thanks Shane. Sounds like it should work. How can i make it happen? – Max Oct 18 '11 at 16:01
  • Depends - do you have access to any Apache config files, or just htaccess? – Shane Madden Oct 18 '11 at 16:12
  • @ShaneMadden htaccess only.. – Max Oct 18 '11 at 23:28

You could try mod_proxy to run a proxy for www.galleries.com/me. Be sure to read the red boxes on the docs page. Also you'll want to check that the service allows this.

Alternatively, you could find a hosted service that allows you to use your own domain (you could use subdomain perhaps e.g. gallery.domain.com) or you could install an FOSS gallery package.


Since you've no access to the normal config context, the normal method of just using ProxyPass is of no use.

Try this, in an .htaccess in the site's root:

RewriteEngine On
# Don't redirect for anything in /blog.
RewriteCond %{REQUEST_URI} !^/blog [NC]
# Everything else, proxy to www.galleries.com/me
RewriteRule (.*) http://www.galleries.com/me/$1 [P]
  • Doesn't do anything.. white page :( – Max Oct 20 '11 at 0:06
  • Interesting. Does it redirect you if you turn the [P] to [R]? If that works but [P] doesn't, then you provider might not have mod_proxy loaded in their Apache configuration. – Shane Madden Oct 20 '11 at 0:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.