Hi,
I have this problem.
I would like a mod rewrite code that will do the following thing:
www.example.com/booking/phpquery -> rewrite to -> booking.example.com/phpquery
I don't want to send a redirect to the browser (so it doesn't know the page is different).
Another example, just to clarify.
If
http://www.example.com/booking/phpquery is entered into the browser, Apache returns the content of
http://booking.example.com/phpquery
I should mentioned here that bookings is a CNAME which points to another domain which i'm affiliated with. So i'm pulling the content from provider website, which is prepared for me, with my logo etc.
I could stay with the solution bookings.example.com/phpquerry, but I will have also other CNAMEs, so solution www.example.com/<various CNAMEs>/ is better for SEO and customers
I tried the code:
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^bookings/(.*) http://bookings.thecheaphotelreservations.com/$1
which is doing the job right, but the address bar changes to:
http://booking.example.com/phpquery, (instead of staying the same http://www.example.com/booking/phpquery)
How should I do it?