Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: masking urls

  1. #1
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts

    masking urls

    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
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link

  • #2
    Senior Coder DJCMBear's Avatar
    Join Date
    Mar 2010
    Location
    United Kindom
    Posts
    1,173
    Thanks
    14
    Thanked 136 Times in 136 Posts
    Not sure if this would be right but check out this forum thread:- http://www.warriorforum.com/programm...n-masking.html
    Official BinPress hand picked coder.
    For anyone worried about SQL injection go have a look at my small yet powerful script here.
    Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
    I am 1 of 65,608 people to get a Pebble Watch :P

  • #3
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    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
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link

  • #4
    Senior Coder DJCMBear's Avatar
    Join Date
    Mar 2010
    Location
    United Kindom
    Posts
    1,173
    Thanks
    14
    Thanked 136 Times in 136 Posts
    Quote Originally Posted by bazz View Post
    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
    you can try this in your .htaccess file:
    Code:
    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]
    Official BinPress hand picked coder.
    For anyone worried about SQL injection go have a look at my small yet powerful script here.
    Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
    I am 1 of 65,608 people to get a Pebble Watch :P

  • #5
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    Oh, thank you. I shall try to implement that tomorrow, when I am more alert.



    bazz
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link

  • Users who have thanked bazz for this post:

    DJCMBear (03-25-2010)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •