TAGS :Viewed: 12 - Published at: a few seconds ago

[ Using .htaccess to mask a sub-domain redirect to shopify.com ]

I am currently using bluehost a registrar for my domain www.exampledomain.com. I created a sub-domain redirect using bluehost C-panel to make a sub domain shop.exampledomain.com that redirects to exampledomain.myshopify.com

I want the url of the sub-domain to mask the url of the shopify domain. So if you click on shop from the root, it would redirect to the sub-domain shop.exampledomain.com and re-write this for every url masking the exampledomain.myshopify.com

I have used godaddy before and they offer a feature that does this, but I can't transfer do to an e-mail setup. Bluehost says they do not offer this feature, but they do offer .htaccess apache and php. If anyone could help I would really appreciate it.

Answer 1


firstly DO NOT redirect. just create the subdomain shop.example.com and in it's root directory put an htaccess file with following code:

RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ http://exampledomain.shopify.com/$1 [NC, L]