You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Michele Braccini <mi...@gmail.com> on 2015/05/12 10:16:49 UTC

[users@httpd] Redirection single pages from subdomain to another subdomain htaccess

I'm working with a Wordpress Installation (WPML with 3rd level domain
es.site.com, fr.site. com, en.site.com ) on LAMP.

I need to redirect many pages from subdomain to a new subdomain (with .htaccess)


Example:
esp.site.com/oldpage -> es.site.com/newpage (different subdomain and
different page names)
esp.site.com/oldpage1 -> es.site.com/newpage  (no clear schema: many
old pages to one new page)
esp.site.com/oldpage2 -> es.site.com/newpage

Old site is very chaotic (static pages + wp installation etc) and
there are no clear rule for redirection and no correspondence from old
url to new url  (I think no regex is possible )

So I need to redirect every single page, but syntax:

Redirect 301 esp.site.com/oldpage http://es.site.com/newpage

doesn't work!

which is the correct syntax ?

Can I manage all from one .htaccess file in main root (www) or should
I create old third domain language directory  (eng, esp, fra)  point
old subdomain to it  (one for every language) and put .htaccess in
every directory with redirection in this way:
for esp/ directory

Redirect 301 /oldpage http://es.site.com/newpage

Can I do all from .htaccess in root domain (www.) ?

Thank you
M.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org