Hide from public access.

billing829

New Member
Wurlie User
Jun 7, 2010
2
0
0
Hello,

André Monteiro from DESK[l]ANCE Support.

Your script is great, however, we would like to hide the main page from public access, I mean, use the script just for our staff to post links on many social networks, without letting people to get into it and create short url's aswell.

How can we do this?

Thanks in advanced,

André Monteiro
http://twitter.com/dl_am
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
Hi André,

This is completely untested, however you should be able to lock down the index.php page to a specific IP within the .htaccess access file.

<Files "(index)\\.$">
order allow deny
deny from all
allow from <your_external_ip>
</Files>

Add this to the end of the root .htaccess file. Failing that, you may be able to find more info here:

http://www.htpasswdgenerator.com/apache/htaccess.html

Adam.
 

billing829

New Member
Wurlie User
Jun 7, 2010
2
0
0
Hello Adam,

We did this way;

We copied the entire source code of index.php and placed into another file, let's say private.php, and saved on the root of the script. then opened index.php and added on top of the page the following code:

<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.desklance.net/" );
die();
?>

Which makes people be redirected to our main domain if they attempt to see /, index.php, index.html, etc.

To avoid getting our short url domain listed on search engines, we created a robots.txt and added the following lines:

User-agent: *
Disallow: /

This avoids any search engine to index the http://d-l.me url on their listings, so that the domain may remain hidden.

We used the IP solution, however, since our ISP has dynamic IP's, we had to apply this fix.

Conclusion, d-l.me is not indexed, nor viewed or accessed by anyone except our staff, and redirects can be create by us on the new page, just give it a try: http://d-l.me/s

I hope this helps anyone else with the same question.

Thank you,

André Monteiro on behalf of Desklance Incorporated.
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
Hi André,

Thanks for the feedback and taking time to post the information.

Best,
Adam.