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

  • Home
  • SEARCH
  • 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 9140105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:28:22+00:00 2026-06-17T09:28:22+00:00

I have a site created which is dynamic and the information (area / category

  • 0

I have a site created which is dynamic and the information (area / category / subcategory) passes through htaccess for nice URLs.
For example, as the user dives into the categories it flows as follows:

/parts/hard-drives

/parts/hard-drives/hard-drives-sas

I wondered if there was a way to extend this from then on in htaccess so I can pass more items and grab the variable with php, ie:

/parts/hard-drives/hard-drives-sas/?manufacturer=dell&price=20

My current lines for the htaccess file are as follows:

RewriteRule ^parts/([^/\.]+)/([^/\.]+)/?$ parts.php?p=$1&f=$2 [L]
RewriteRule ^parts/([^/\.]+)/?$ parts.php?p=$1 [L]
RewriteRule ^parts parts.php [L]

You will see the first line relates to /products/hard-drives/hard-drives-sas the second relates to /products/hard-drives and then simply a parts page /parts

Hopefully that makes sense!

Thanks.

  • 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-17T09:28:22+00:00Added an answer on June 17, 2026 at 9:28 am

    Use QSA flag to pass GET variables:

    RewriteRule ^parts/([^/\.]+)/([^/\.]+)/?$ parts.php?p=$1&f=$2 [L,QSA]
    RewriteRule ^parts/([^/\.]+)/?$ parts.php?p=$1 [L,QSA]
    RewriteRule ^parts parts.php [L,QSA]
    

    Docs:

    When the replacement URI contains a query string, the default
    behavior of RewriteRule is to discard the existing query string, and
    replace it with the newly generated one. Using the [QSA] flag causes
    the query strings to be combined.

    Consider the following rule:

    RewriteRule /pages/(.+) /page.php?page=$1 [QSA]

    With the [QSA] flag, a request for /pages/123?one=two will be mapped
    to /page.php?page=123&one=two. Without the [QSA] flag, that same
    request will be mapped to /page.php?page=123 – that is, the existing
    query string will be discarded.

    http://httpd.apache.org/docs/2.2/rewrite/flags.html#flag_qsa

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

Sidebar

Related Questions

I have created a web site which is valid to strict XHTML and passes
When I have an Eclipse update site project, a site.xml file is created which
I have a site which relies heavily on javaScript. I created a mirror site,
I have created an iframe which contains the label, powered by MyWebsite.site The iframe
I have created a site which has some roles. and each user can have
i have created the site in which i want to use bing search API
I have created a master page (Site.master) which contains the code to display a
I have a multisite with drupal, I created a site which at first should
We have a site www.name1.domain.com for which we successfully created and implemented an SSL
I have a site which contains around 3000 static and dynamic pages. I think

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.