oli22 Posted January 29, 2011 Share Posted January 29, 2011 HI all not i was not sure in which section to post this question, here it is. How can i hide or encode url folder path to prevent folder access and maybe make url look nicer? I have ads stored in a folder and i want to restrict user access to certain hosted files so i was thinking changing the appearance of the url. This is what shows in url right now: http//:127.0.0.1/mysite/ad_Pages/test.phpurl=http%3A%2Fww.google.com&title=GOOGLE I think anyone who knows would type this section of url and enter my "utility files" : http//:127.0.0.1/mysite/ad_Pages So how can i prevent this? Quote Link to comment Share on other sites More sharing options...
©ode® Posted January 29, 2011 Share Posted January 29, 2011 You should be able to remove public access by setting the proper CHMOD settings on the folder and files within. Quote Link to comment Share on other sites More sharing options...
oli22 Posted January 29, 2011 Author Share Posted January 29, 2011 thank you and may i ask how to do this? Quote Link to comment Share on other sites More sharing options...
©ode® Posted January 30, 2011 Share Posted January 30, 2011 Well you can CHMOD through your file manager in most cases or through SSH/Telnet or even your FTP program. Here is a tutorial using an FTP program: http://www.phpjunkyard.com/tutorials/ftp-chmod-tutorial.php Hope that helps! Quote Link to comment Share on other sites More sharing options...
haku Posted January 30, 2011 Share Posted January 30, 2011 chmod will prevent the file being accessed altogether. I believe the OP wants to re-write the URL to look cleaner than it does now. If that's the case, you want to look into Apache's mod rewrite function. If you are on a different server, you're on your own, I only know how to do it with apache servers! Quote Link to comment Share on other sites More sharing options...
arbitter Posted January 31, 2011 Share Posted January 31, 2011 Using modrewrite will help indeed. Also you must have a robot.txt, so that google and whatever do not crawl and index that. For example, the main php of my site was index.php, but I was working on a second version on index2.php (which I would eventually replace the index.php file with), but because this index2.php had more info, it even came up higher than the original index.php file! However I'm no champ in the restriction and whole how apache and stuff works stuff Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.