...

View Full Version : masking urls



bazz
03-25-2010, 05:44 AM
Hi,

I see some domain registrars provide a url masking service so that a website like this:

www.somestupidurl.com/index

can show in the browser as

www.example.com

and if viewing secondary pages of www.somestupidurl.com/page2

it will show as

www.example.com/page2

I reckon this is done with .htaccess but is it and, if so, how?

bazz

DJCMBear
03-25-2010, 05:51 AM
Not sure if this would be right but check out this forum thread:- http://www.warriorforum.com/programming-talk/76729-htaccess-code-domain-masking.html

bazz
03-25-2010, 06:09 AM
Thanks for that link.

I don't want to use a frameset. I want it to be that when someone visits www.mysite.com/somesite/index that when they arrive at the page, it shows www.theirsite.com/index

Nothing naughty. It just means I can host some clients sites as a sub domain of mine bit that when people view their site, they see it as being their own site.

My domain registrar offers it as a service so it is do-able. But I want to offer it as part of my package.

I see you are as nocturnal as I am :)

bazz

DJCMBear
03-25-2010, 06:16 AM
Thanks for that link.

I don't want to use a frameset. I want it to be that when someone visits www.mysite.com/somesite/index (http://www.mysite.com/somesite/index) that when they arrive at the page, it shows www.theirsite.com/index (http://www.theirsite.com/index)

Nothing naughty. It just means I can host some clients sites as a sub domain of mine bit that when people view their site, they see it as being their own site.

My domain registrar offers it as a service so it is do-able. But I want to offer it as part of my package.

I see you are as nocturnal as I am :)

bazz

you can try this in your .htaccess file:


Options +FollowSymlinks
RewriteEngine on
#two domains served from one root..
RewriteCond %{HTTP_HOST} domain-one.com
RewriteCond %{REQUEST_URI} !^/one
RewriteRule ^(.*)$ one/$1 [L]

RewriteCond %{HTTP_HOST} domain-two.com
RewriteCond %{REQUEST_URI} !^two
RewriteRule ^(.*)$ two/$1 [L]

bazz
03-25-2010, 06:31 AM
Oh, thank you. I shall try to implement that tomorrow, when I am more alert.

:thumbsup:

bazz



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum