Apache conf files have their own syntax. In my experience, it takes some exposure and experimentation before one starts to understand them. Your example uses the Redirect directive, which appears to be implemented as part of mod_alias
. Your apache server may or may not have mod_alias enabled. To see what apache modules are enabled, see this thread.
The Redirect
directive doesn't look very flexible. The docs say:
The Redirect directive maps an old URL into a new one by asking the client to refetch the resource at the new location.
The old URL-path is a case-sensitive (%-decoded) path beginning with a slash. A relative path is not allowed.
The new URL may be either an absolute URL beginning with a scheme and hostname, or a URL-path beginning with a slash. In this latter case the scheme and hostname of the current server will be added.
Then any request beginning with URL-path will return a redirect request to the client at the location of the target URL. Additional path information beyond the matched URL-path will be appended to the target URL.
You might consider checking out mod_rewrite which is more advanced & flexible. It implements pattern matching behaviors which will probably give you more powerful ways to send an old url to new one. Your post appears to redirect not just to a new domain but also changes 'oldlocation' to 'newlocation'. You may need to implement some kind of elaborate RewriteMap thing, depending on how you have changed your urls.