简体   繁体   中英

.htaccess rewrite domain but keep directory structure and preserve url in address bar

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM