.htaccess - Rewrite rules for a branch of content formerly under a CNAME alias -
i'm migrating blog installation new server. original installation on amazon server. new server location true server amazon install made appear @ through dns changes , cname alias.
the aliased urls looked this...
blog.domain.tld/articles/{title of articles}
at new , true domain location, false "blog" aliasing dropped, , new url structure be...
domain.tld/articles/{title of articles}
i need setup mod_rewrite rules calls old fake urls land people @ new , true ones. i've seen examples online of root-to-subdirectory or subdirectory-to-root redirects on same server, in case faux subdirectory involved on different server, i'm not sure do. i'm not sure makes sense (or possible) redirect aliased url.
anyone have pointers, insights, or examples? in advance.
this similar redirecting www. links non-www links, following should work:
rewritecond %{http_host} ^blog\.domain\.tld$ rewriterule (.*) http://domain.tld/$1 [r=301,l]
Comments
Post a Comment