Rewrite all URLs (dev to production)

Hi there,

current scenario: Customer gets a relaunch of his whole website. In order to minimize downtime we installed kirby on a subdomain so the customer is able to transfer and optimize contents to kirby.

If the customer is finished I want to rewrite all urls in the contents from the sub.domain.com to domain.com to replace the old website (change point of url to the newly kirby install folder).

I could do that with redirects in the htacces, but I dont think this is a clean way of doing it, because the subdomain url is still in all html files and crawled by google?

Thanks for the help in advance.

Must admit that I don’t really understand. Where are you storing hard-coded URLs?

Usually, you would just point the domain to the new folder and be done with. Apart from redirecting old, no longer existing URLs to the corresponding equivalents in the new installation.

I thought when someone adds a link via any block or textarea or link field with the subdomain url? This β€œwrong” subdomain url is inside the content.