Click here to Skip to main content
Rate this: bad
good
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 at 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 :)
Sergey Alexandrovich Kryukov at 8-May-13 10:08am
   
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 at 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 :)
Sergey Alexandrovich Kryukov at 8-May-13 10:19am
   
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 at 8-May-13 10:20am
   
I have :) Enjoy your day
 
Regards,
Chris
Sergey Alexandrovich Kryukov at 8-May-13 10:27am
   
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
0 OriginalGriff 245
1 Jochen Arndt 155
2 PIEBALDconsult 150
3 Afzaal Ahmad Zeeshan 120
4 DamithSL 115
0 OriginalGriff 5,695
1 DamithSL 4,591
2 Maciej Los 4,012
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,190


Advertise | Privacy | Mobile
Web04 | 2.8.141220.1 | Last Updated 8 May 2013
Copyright © CodeProject, 1999-2014
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