Forum Moderators: phranque
Looking for some advice.
I have a domain (domain.co.uk) and a shop (shop.domain.co.uk), of which I would like to rewrite the URLs from one to the other. For example I would like the first URL to be whats displayed in the address bar, but the second to be the source:
www.domain.co.uk/product/4/ -> shop.domain.co.uk/product-4.asp
www.domain.co.uk/category/ -> shop.domain.co.uk/category.asp
Is there a .htaccess script that can do this, or something else?
I have tried:
RewriteRule ^category/$ [shop.domain.co.uk...] [L]
but this just redirects the user.
Any advice is very welcome.
Thanks
www.domain.co.uk/product/4/ <-- /product-4.asp
With "<--" read as, "provides the content for."
Since you gave an HTTP method and a hostname in your code, that's a 302 redirect. Try just:
RewriteRule ^category/$ /category.asp [L]
Jim
Also, be aware that the www server will have to send each client request on to the shop server, wait for the shop server's response, and then pass that back to the client. So you now have twice the delay and half the reliability as before.
Jim