I have a parked domain example.co.uk on another domain name web-space in a folder and need to rewrite the domain name in the browser URL as it currently shows the other domain name while browsing and I need it to read example.co.uk.

When parking the domain the ISP automatically added this which works although displays another domain name.

RewriteCond %{HTTP_HOST} ^example\.co\.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www\.example\.co\.uk$
RewriteRule ^/?$ "http\:\/\/www\.otherdomain\.eu\/myfolder" [R=301,L]

1 Answer 1


Remove the R=301 from the end, so it's just:

RewriteRule ^/?$ "http\://www.otherdomain.eu/myfolder" [L]

That directive tells Apache to serve an HTTP 301 (Permanently Moved) response, and hence the browser is served the rewritten location. Without it, Apache just silently rewrites the request and serves the content in the rewritten directory with a standard HTTP 200 response.

  • yes i made those changes and it hasn´t made any visible difference.My main problem is, www.iq3d.co.uk is my site and it sits on my friends web space www.cabezon.eu/iq3d and I need the browser url to read only www.iq3d.co.uk/**** and not display the fact that i am resting the files on another site.
    – Stefano
    Jun 12, 2012 at 22:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.