Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a parked domain ¨mysite.co.uk¨ on another domain name webspace in a folder and need to rewrite the mysite.co.uk domain name in the browser URL as it currently shows the Other domain name while browsing and i need it to read mysite.co.uk.

When parking the domain the isp automatically added this which works although displays anotherdomain name.

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

share|improve this question
add comment

1 Answer

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.

share|improve this answer
    
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 '12 at 22:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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