URL cloaking/masking question

Discussion in 'PHP' started by anjaan79, Mar 29, 2009.

  1. #1
    Hello,

    I am looking for some help on .htaccess using it on a subfolder. If you have any idea, please let me know.

    I want users to see http://www.mydomain.com/folder in their address bar everytime they access anything under /folder

    For Example:

    When accessing http://www.mydomain.com/folder/4544.html or http://www.mydomain.com/folder/6857.html their address bar should always read http://www.mydomain.com/folder or http://www.mydomain.com

    Please note that I do not want users to be redirected....I simply want to hide the actual URL.

    I do not want to use iframe. Also, I understand that hiding actual URLs is not good for SEO but I am fine with that.

    thank you very much.
     
    anjaan79, Mar 29, 2009 IP
  2. NatalicWolf

    NatalicWolf Peon

    Messages:
    262
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #2
    That is not really possible...Because you are using a direct URI. No matter how you cut it, you need to redirect...And even then it wont work. So maybe someone else has an idea but based on what I know about HTTP, its not possible.
     
    NatalicWolf, Mar 29, 2009 IP
    anjaan79 likes this.
  3. anjaan79

    anjaan79 Active Member

    Messages:
    189
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #3
    I read on some forums that .htaccess may help...I guess not in this case
     
    anjaan79, Mar 29, 2009 IP
  4. victor9191

    victor9191 Active Member

    Messages:
    615
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    90
    #4
    Well idk , but proxies use something like that, so u can look into that..
     
    victor9191, Mar 29, 2009 IP
  5. anjaan79

    anjaan79 Active Member

    Messages:
    189
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #5
    anjaan79, Mar 29, 2009 IP
  6. NatalicWolf

    NatalicWolf Peon

    Messages:
    262
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #6
    You cant remove the last part, its the URI.
     
    NatalicWolf, Mar 29, 2009 IP
  7. SmallPotatoes

    SmallPotatoes Peon

    Messages:
    1,321
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You have to use frames/iframes, or make every single internal link part of a <form method="post">. I don't believe there's any other way.
     
    SmallPotatoes, Mar 29, 2009 IP
  8. TheNoose

    TheNoose Peon

    Messages:
    1,005
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #8
    There has to be a way as I have seen this done on many websites before. Next time I come across one like that I'll post it so you can check the source (I dunno if it would be in there?)

    I'm sure someone must know how it's done.
     
    TheNoose, Mar 30, 2009 IP
  9. SmallPotatoes

    SmallPotatoes Peon

    Messages:
    1,321
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Those web sites are either using frames, or the changes you see on the page are done with AJAX.
     
    SmallPotatoes, Mar 30, 2009 IP
  10. Ed Byerly

    Ed Byerly Member

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #10
    If you don't want your link to display in the status bar at the bottom, use a javascript function call from onmouseover/onmouseout to rewrite window.status. To follow a link, use a javascript function call from an onclick to load the link into location.href.

    Someone can still look at the source and get the link if they really want it. It's all but impossible to keep a techie type from getting it. But who cares anyway?
     
    Ed Byerly, Mar 30, 2009 IP
  11. SmallPotatoes

    SmallPotatoes Peon

    Messages:
    1,321
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Are there still any browsers that allow this?
     
    SmallPotatoes, Mar 31, 2009 IP
  12. Ed Byerly

    Ed Byerly Member

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #12
    Do browsers not allow javascript anymore?
     
    Ed Byerly, Mar 31, 2009 IP
  13. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #13
    Any decent browser nowadays will let you control if you want to allow changing the statusbar text, resizing the windows etc. Most of the time these things are not allowed, by default, so to utilize it the user actually have to turn this stuff on.

    Therefore, it is "not allowed" anymore. Simple.
     
    PoPSiCLe, Mar 31, 2009 IP