Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8338709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:40:41+00:00 2026-06-09T04:40:41+00:00

I have a url in this format: sitename.com/folder/file.php. How do I make it a

  • 0

I have a url in this format: “sitename.com/folder/file.php”. How do I make it a “sitename.com/randomhash” or “sitename.com/folder/randomhash” format?

I know I can use a GET & Switch system but I need the name to be unique and I need to be able to change it on the fly.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T04:40:44+00:00Added an answer on June 9, 2026 at 4:40 am

    I don’t really understand what your point is, but if you don’t want you’re visitors to know where your php-files are stored, I would recommend reading this:

    Tutorial for URL handling in PHP

    If you are having a website where people can download stuff, and you don’t want people hotlinking your files, you could do the following steps (i’m not writing the code, I’m just going to give you a general idea):

    1. People come to your website.
    2. Person clicks on link because they want to download that particular file.
    3. Person comes on page, where you have the opportunity to set a cookie with a random hash.
    4. Simultaneously you put a value in a database, with the same hash and the filepath of the file they want to download.
    5. On this page, they have to click “DOWNLOAD NOW!”, where they are redirected to download.php.
    6. In download.php you read the cookie, then match that with the database and get the filepath.
    7. With the right php-headers, you can force download.php to download the file.

    Important in this situation is that you set your settings of Apache (or whatever server you have) that downloading is not allowed unless ‘localhost’ is requesting it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string in JS in this format: http\x3a\x2f\x2fwww.url.com How can I get
I have an url like this: http://www.w3schools.com/PHP/func_string_str_split.asp I want to split that url to
I have a url like this - www.example.com/blog.php/username, it will take you to the
Let's say I have this url: www.example.com/test.php?page=4 How do i retrieve the value of
I am making use of Codeigniter and I currently have this URL format setup:
i have a url that will be consistent in this format: http://www.name.com/heart/game/2012/topics/SOMETHINGHERE.html I need
I have a link in this format: http://user:pass@example.com How to get user and pass
I have a String holding a URL in this format: http://hello.world.com/service/sps/f4c0e810456t And I would
I have an URL like this: http://site.com/images/961b7d0e50f0462a8828d31bf0874a71/lightbox I need to string.format replace the GUID
I have a url in string format like this : str=http://code.google.com and some other

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.