0
votes

I have copied a Joomla site from one domain to a new domain.

I want to rewrite the domain name only to keep the directory structure.

And I want to keep the original URL in the address bar to preserve SEO ranking.

Joomla is using relative url's, so the real domain name of the new server will not as such be invoked by Joomla.

How to do this in .htaccess on Apache?

1
Can you please post a before and after example URL of what you want it to do. So like oldsite.com/this-is-my-article should become newsite.com/this-is-my-article?YellowWebMonkey
@YellowWebMonkey, you got it right, except I want the after URL to be same as before URL, but showing the content of the after URL.Henrik Juul-Nyholm
Why switch the domain in the first place then? Doing a masked redirect like that will not help SEO anymore than just doing proper 301 redirects.YellowWebMonkey

1 Answers

0
votes

And I want to keep the original URL in the address bar to preserve SEO ranking.

That won't help you really, just add proper 301 redirects and make sure you catch as much of the indexed url's with your redirects component within joomla to prevent any dead links (google hates those and will penalize your domain for it). Also add sitemap, upload it to your google webmaster tools and ask google to index it.