Jump to content

Redirecting domains to another and append redirected domain as query string


alexm
 Share

Recommended Posts

Hi all,

I have the following in my htaccess file:

RewriteCond %{HTTP_HOST} !^www\.buydomain\.uk
RewriteRule ^(.*)$ http://www.buydomain.uk$1 [R=301,L]

which forwards all domains pointing to this location to buydomain.uk which is working fine.

.htaccess is by no means my strong point so was wondering whether anyone knew how I could pass the redirecting domain to buydomain.uk as a parameter.

e.g. going to example.com would then redirect to https://www.buydomain.uk/?url=example.com

Any help with this would be greatly appreciated.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...