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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:03:24+00:00 2026-06-03T22:03:24+00:00

My project have data about different websites so I have rewritten urls using .htaccess

  • 0

My project have data about different websites so I have rewritten urls using .htaccess so that when ever someone passes a name containing a dot(.) to my website, it shows the site.php page. here is my code for that:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-zA-Z0-9\_\-]+(\.)[a-zA-Z0-9\_\.\-]+)/?$ site.php?url=$1
RewriteRule contact$ contact.php

This sends site name as parameter to site.php. Now I want one more parameter to be passed to is like it could have been passed in general, for ex. I want the site to get real time updated data, i want to pass ?update=true so that it updates the data from internet rather then taking it from database. But passing parameter like this

http://www.mysite.com/anysite.com?update=true

isn’t working, how can I pass additional parameters to my existing rewritten url?

  • 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-03T22:03:25+00:00Added an answer on June 3, 2026 at 10:03 pm

    The [QSA] flag (“query string append“) will append any received query string onto the rewritten URL. I have also added the [L] flag as a best practice to prevent a match to your first rule also matching an additional rule later on in your chain, should one ever be added.

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^([a-zA-Z0-9\_\-]+(\.)[a-zA-Z0-9\_\.\-]+)/?$ site.php?url=$1 [QSA,L]
    RewriteRule contact$ contact.php [QSA,L]
    

    However, if I have misunderstood the problem and you don’t need for the browser to be sending update=true but rather just want to force it on all requests, simply add it to the rewrite rule:

    RewriteRule ^([a-zA-Z0-9\_\-]+(\.)[a-zA-Z0-9\_\.\-]+)/?$ site.php?update=true&url=$1 [QSA,L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my current project I have data about colors. Each color is either a
I have few questions about using lock to protect my shared data structure. I
I have a Smart GWT Project where the data that is to be displayed
Lots of BAWs (big ass-websites) are using data storage and retrieval techniques that rely
We are developing a project that involves about 10 different WCF services with several
I have a medium-sized project, which implements about 20 or so different concepts. At
For a project we having a bunch of data that always have the same
I have a project with a number of different classes querying and modifying data
I have created data sources from my objects in my project, some of which
I have a project for my Data Structures class, which is a file compressor

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.