Mobile app version of vmapp.org
Login or Join
Odierno851

: .htaccess rewrite , parked domain on another site to read the proper domain name I have a parked domain example.co.uk on another domain name web-space in a folder and need to rewrite the domain

@Odierno851

Posted in: #Domains #Htaccess #ModRewrite #Parking #UrlRewriting

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]

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Odierno851

1 Comments

Sorted by latest first Latest Oldest Best

 

@BetL925

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme