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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:47:08+00:00 2026-05-16T04:47:08+00:00

I have an issue with URL-rewriting in .htaccess. Here is .htaccess file: RewriteEngine On

  • 0

I have an issue with URL-rewriting in .htaccess. Here is .htaccess file:

RewriteEngine On
RewriteBase /community/

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

RewriteRule ^view-all-results$ forums/index.php?view=view-all-results [R=302]
RewriteRule ^view-all-results/$ forums/index.php?view=view-all-results [R=302]

I need to rewrite url like “/community/view-all-results?u=2” to “community/forums/index.php?view=view-all-results&u=2“.
But according to the above rule I’ll get “community/forums/index.php?view=view-all-results“.

I tried to change RewriteRule to

RewriteRule ^view-all-results?(.*)$ forums/index.php?view=view-all-results&$1 [R=302]

But it doesn’t work properly. It still rewrites URL to “community/forums/index.php?view=view-all-results“.

When I changed rule(put + instead of *):

RewriteRule ^view-all-results?(.+)$ forums/index.php?view=view-all-results&$1 [R=302]

I’ve got URL like “community/forums/index.php?view=view-all-results&s“. So I don’t understand this behavior.((

I will be very appreciated for any suggestions.

  • 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-16T04:47:08+00:00Added an answer on May 16, 2026 at 4:47 am

    The magic flag is in the docs: [QSA], which will add the original querystring to your url.

    Normal matching is only done against the path, not agains the querysting, which you would find in the magic variable %{QUERY_STRING}). Matching this variable can be done in a RewriteCond condition. You could also append this variable to the resulting url, but QSA is infinitely more userfriendely here.

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

Sidebar

Related Questions

I have an issue with url rewriting, here's what I have so far: Options
I'm using Intelligencia UrlRewriter for URL Rewriting, the only issue I have is trailing
all. This time I try cakephp, but I have got URL rewriting is not
I have a database whose columns are npID, title, URL, and issue. Here is
Here is issue that we have on one of our site: File/directory name bruteforcing
I need help with url-rewriting in .htaccess. So the issue is about different protocols:
I have the following .htaccess rewriting urls such as url.com/category/page and url.com/page and then
I have big issue with url-rewriting for IIS 7.0. I've written simple module for
First of all, I have following directory structure: /project_directory/rewriting_experimentation_directory htaccess File realfile.txt What I
Have an issue with marshall and unmarshall readers and writers. So here it is.

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.