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 2 of 2
  1. #1
    New Coder
    Join Date
    May 2009
    Posts
    75
    Thanks
    1
    Thanked 12 Times in 12 Posts

    Hiding subdomain with mod_rewrite

    I want to be able to hide the subdomain from a URL, so if you type in foo.example.com/content.html it rewrites it to example.com/content.html. However I can't have it actually redirect to example.com/content.html, which contains irrelevent content, I'm trying to have it simply hide the foo without accessing whatever is at example.com/content.html

    I have a less important question because I believe it's not possible due to security limitations, but is it possible to achieve the above with foo.example.com/content.html, but rewriting to anotherdomain.com/content.html without accessing what is actually at anotherdomain.com/content.html?

  • #2
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,302
    Thanks
    28
    Thanked 276 Times in 270 Posts
    Quote Originally Posted by TheBlueblib View Post
    I want to be able to hide the subdomain from a URL, so if you type in foo.example.com/content.html it rewrites it to example.com/content.html. However I can't have it actually redirect to example.com/content.html, which contains irrelevent content, I'm trying to have it simply hide the foo without accessing whatever is at example.com/content.html

    I have a less important question because I believe it's not possible due to security limitations, but is it possible to achieve the above with foo.example.com/content.html, but rewriting to anotherdomain.com/content.html without accessing what is actually at anotherdomain.com/content.html?
    It's not possible to do either. I can't think of any reason why you'd want to do these things anyway except to fool users into thinking they're on another domain (for, say, phishing).
    For every complex problem, there is an answer that is clear, simple, and wrong.


  •  

    Posting Permissions

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