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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:37:15+00:00 2026-05-30T23:37:15+00:00

For my site let’s say I have a file in a folder called ‘download’

  • 0

For my site let’s say I have a file in a folder called ‘download’

so the direct link for the file would be http://www.testing.com/download/file.exe

I want to throw an authorization token with it like so, …/download/file.exe?auth=asdffg122**, with the auth token being a hash from time and expiry. So far I have written in a .htaccess file :

 RewriteEngine on
 RewriteRule \(.*)$.(exe)$ check.php?file=$1?auth=$2 [QSA]

I want to pass the name of the file to variable $1, and the auth token to the $2 variable. Is there a way to do this?

  • 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-30T23:37:16+00:00Added an answer on May 30, 2026 at 11:37 pm

    like this?

     RewriteEngine on
     RewriteCond %{QUERY_STRING} .*auth=(.*)\&*.*$
     RewriteRule ^.*\/(.*\.exe)$ check.php?file=$1&auth=%n
    

    Assuming you add the auth= to the GET request
    Edit: Modified based on comment from $@Orbling

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

Sidebar

Related Questions

Let's say I have a site with multiple links as follows: www.example.com/product/1 www.example.com/product/2 www.example.com/product/3
Let's say I have a site where Users can add Entries through admin panel.
let me explain my current situation i have a SharePoint site lets say it
Let's say I have a really simple site where I allow registered users to
Let's say I have a StackOverflow-esque site. I want to post a comment underneath
i have a (php) wordpress site on let's say domain1.com and i bought another
Let's say I have a site where all urls are username specific. For example
Let's say I have structure of Umbraco site as - Node1 - Node2 -
Let say that i have this to url's site.com/hello-world/test.html site.com/hello-world/test/test.html if i go to
Let's say, on a ColdFusion site, that the user has navigated to http://www.example.com/sub1/ The

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.