Forum Moderators: phranque
Options +FollowSymlinks
RewriteEngine On
RewriteRule ^flights/(.*)$ [cname.mysite.com...]
[cname.mysite.com...] is a CNAME record that points to our supplier.
This worked perfectly fine on our old server.
I have now moved hosts and this no longer works. However if I replace [cname.mysite.com...] with the suppliers site.
Example
Options +FollowSymlinks
RewriteEngine On
RewriteRule ^flights/(.*)$ [supplierssite.com...]
It works fine.
The rewrites appear be failing on any CNAMES we have setup.
Anybody got any ideas? It’s driving me mad.
This is almost certainly a DNS problem, not a problem in your server.
Try Pinging and running TraceRt on the CNames -- that should give you an indication of whether the DNS is set up properly and has been updated.
Jim
I have amended the mod_rewrite rule to include [R,L] on the end of each rule the problem appeared to have been that a rewrite rule to a subdomain is treated as an internal link. The [R,L] treats it as an external url hence redirects to the full path specified.
It worked fine on the old server without the [R,L] not sure why.