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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:02:24+00:00 2026-05-15T01:02:24+00:00

I have a problem with my two RewriteRules. .htaccess: # protect the htaccess file

  • 0

I have a problem with my two RewriteRules.

.htaccess:

# protect the htaccess file
<files .htaccess>
 order allow,deny
 deny from all
</files>

RewriteEngine On
Options +FollowSymlinks
Options -Indexes
RewriteBase /test/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^download/([0-9]+)$ download.php?id=$1 [L]
RewriteRule ^(.*)$ index.php?c=view&misc=$1 [B]

If the url contains download (some like this: mydomain.com/download/9) the first rule should redict this request to download.php?id=9. But it doesn’t.

var_dump($_GET) shows the following:

array(2) { ["c"]=>  string(4) "view" ["misc"]=>  string(9) "index.php" } index.php

Any ideas?

  • 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-15T01:02:24+00:00Added an answer on May 15, 2026 at 1:02 am

    Ok, I solved the problem.

    # protect the htaccess file
    <files .htaccess>
     order allow,deny
     deny from all
    </files>
    
    RewriteEngine On
    Options +FollowSymlinks
    Options -Indexes
    
    RewriteBase /test/download/
    RewriteRule ^download/([0-9]+)$ download.php?id=$1 [L]
    
    RewriteBase /test/
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    
    RewriteRule ^(.*)$ index.php?c=view&misc=$1 [B]
    

    Thanks guys! 🙂

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

Sidebar

Related Questions

I have a problem with two htaccess files that i have in a hosting
I have strange problem with .htaccess I can't solve: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond
I have problem merging two XML files. I loaded both files into two objects,
I have two websites that is actually the same where example.com shares all files
I Have two problem in this Case : I want to pass a JSON
I have a problem with two Textviews on the same height in a RelativeLayout
I have had this problem w/ two seperate WYSWYG editors in my rails application
I have an strange problem using two borders. I use them to display video
Hello I have problem to put together animations of two separate objects to second
Problem: I have two spreadsheets that each serve different purposes but contain one particular

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.