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 7194581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:24:05+00:00 2026-05-28T20:24:05+00:00

On a php web page, i’m displaying an html5 player which plays an mp3

  • 0

On a php web page, i’m displaying an html5 player which plays an mp3 track, and there’s a download button next to that. I want to mask the download link only, so visitors will not be able to see the directory tree of my server (www.example.com/content/plugins/audio/downloads/test.mp3). I want to change the link to something more simple and smaller like (www.example.com/download/test.mp3) without changing the folders structure of my server.

I’m not sure if it is an .htaccess or PHP thing.

Thanks in advance.

  • 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-05-28T20:24:06+00:00Added an answer on May 28, 2026 at 8:24 pm

    With .htaccess you would need the following rewrite rule:

    $ pwd
    /var/www
    $ cat .htaccess
    RewriteEngine on
    RewriteRule ^/download/(.*\.mp3) /content/plugins/audio/downloads/$1 [NC]
    

    It will match all http://yourdomain.com/download/….mp3 requests and redirect to http://yourdomain.com/content/plugins/audio/downloads/….mp3

    If you want your .htaccess to work from inside a subdirectory, use RewriteBase:

    $ cat subdirectory/.htaccess
    RewriteEngine on
    RewriteBase /subdirectory
    RewriteRule ^download/(.*\.mp3) content/plugins/audio/downloads/$1 [NC]
    

    i.e. http://yourdomain.com/subdirectory/download/….mp3 to http://yourdomain.com/subdirectory/content/plugins/audio/downloads/….mp3

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

Sidebar

Related Questions

The situation is next: I have php file, which parses a web-page. on that
I have web page in PHP which displays all records in a table. I
I am currently finishing a web page in php. Basically there is some data
I code a simple php/mysql web page, that there is page1.php , page2.php and
I have a web page and using php Im quering a database and displaying
How do I run a PHP web page in Eclipse? I am using PDT
Basically I am trying to restart a service from a php web page. Here
I'm working on a PHP dynamic web page that has a <textarea> element that
I have a web page x.php (in a password protected area of my web
I have a web page coded in PHP. This page is for posting a

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.