You will find there's site with identical content for 2 british speaking domain names.
After searching around for top method of handling this, we elected for google's recommendation of utilizing country specific domains - apparently Google assists in the correct domain in line with the user's location.
Regrettably our Content management systems is only going to offer one sitemap.xml file - therefore the links within the sitemap only contain among the country specific domain names.
We have now produced a sitemap.xml apply for each domain (in various sites) but need a method to serve the right sitemap in line with the incoming domain.
domain.com/sitemap.xml (.com web addresses only) &lifier domain.co.united kingdom/sitemap.xml (.co.united kingdom web addresses only)
Is employment for mod-rewrite and when so, how does one start setting this up?
This will be our first knowledge about mod-rewite outdoors of the items the Content management systems provides and also have found the documentation a little confusing sorry - any help could be much appreciated!
You are able to certainly use mod_rewrite with this and employ HTTP_HOST like a condition, for instance:
RewriteEngine On RewriteCond % domain.com$ [NC] RewriteRule ^sitemap.xml /sitemapus/sitemap.xml [L] RewriteCond % domain.co.united kingdom$ [NC] RewriteRule ^sitemap.xml /sitemapuk/sitemap.xml [L]
This makes the redirect to occur around the server, therefore the client's browser does not get rerouted.