Click here to Skip to main content
12,075,066 members (67,596 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: HTML PHP
I was wondering if it is possible to hide your URL from visitors on your site.

For example:

If my homepage URL is http://www.mydomain.co.za/pages/home.php.

How do I change that to for instance http://www.mydomain.co.za?

I do not want to show the /pages/home.php for reasons like:

I might have a file download on the page and if a user can figure out that these files are for instance in /files/myfile.zip then he can download it like that. Why is this n problem? Lets say the user needs to pay for the file or he needs to subscribe.

Long, useless story short. How do I do this?

Thanks in advance,
Chris
Posted 8-May-13 4:35am

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Probably you are looking for the technique called URL rewriting: http://en.wikipedia.org/wiki/URL_rewriting[^].

Please see: http://bit.ly/15pnap6[^].

—SA
  Permalink  
Comments
Christopher Smit 8-May-13 9:53am
   
More closely to what I am looking for would be something like a cloak. There should be NOTHING after the http://www.mydomain.co.za/

Just that.. Is that possible? Thank you for the tip on rewriting though :)
   
Yes, but NOTHING means that only one URI is possible. To make at least one more URI, you would need to wrote at least SOMETHING after the last '/'... :-)
—SA
Christopher Smit 8-May-13 10:15am
   
I found a way to do it by simple using <iframe> tag. But that is not what I want to do.. So I will go with the Rewrite instead.. Thanks for the help :)
   
Of course this is not it. Hope you can get good results with URI rewriting.
Will you accept my answer formally then (green button)?
—SA
Christopher Smit 8-May-13 10:20am
   
I have :) Enjoy your day

Regards,
Chris
   
I will try to. :-) Thank you, you too.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web03 | 2.8.160208.1 | Last Updated 8 May 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100