Jump to content

How to hide or encode url folder path to prevent folder access?


oli22

Recommended Posts

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?

 

 

 

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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 :P

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.