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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:18:12+00:00 2026-06-04T17:18:12+00:00

This is my second post because i also can’t find the solution so I

  • 0

This is my second post because i also can’t find the solution so I am looking forward to your help. My company website has been created by a resigned staff. He used the htaccess file to exchange all of the link in website. And now, when I want to pass a variable from one page to second page via address bar, the second page can’t GET the variable because of the affect of htaccess. Anyone can help me to find the solution to revise the htaccess when i had tiny experience of htaccess file. Here is htacess file.

RewriteEngine On
Options All -Indexes
DirectoryIndex index.php
RewriteRule ^index\.html$ index.php
RewriteRule ^B2C/(.*)/(.*)/(.*).html$ index.php?lang=$1&p=$2&id=$3
RewriteRule ^B2C/(.*)/(.*).html$ index.php?lang=$1&p=$2
RewriteRule ^B2C/(.*)/$ index.php?lang=$1
RewriteRule ^postoffice.html$ more/PO.php
RewriteRule ^hospital-clinic.html$ more/HO.php
ErrorDocument 401 /errors/401.html
ErrorDocument 403 /errors/403.html
ErrorDocument 404 /errors/404.html
ErrorDocument 500 /errors/500.html

AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html

Here is my code in tag which want to pass the variable $main_po_num in page “1”

echo "<td><a href='B2C/$lang/Contact_detail.html?abc=$main_po_num'>$main_po_num</a></td>";

Here is code I vardump in page “2” which return NULL (meaning can’t Get the pass variable)

var_dump ($_GET["abc"]);

Even the address bar can display the variable

.64.4:1234/B2C/vi/Customer_Contact?abc=S110023845.html

So how can i revise the htacess then i can pass and get the variable between 2 page. 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-04T17:18:14+00:00Added an answer on June 4, 2026 at 5:18 pm
    RewriteRule ^B2C/(.*)/$ index.php?lang=$1 [QSA]
    

    The [QSA] flag appends the query string (in your case, abc) to this rule. Currently, your rule ignores the query string that was passed and uses only the lang, etc. variables. For this to apply to all of your rules, each rule needs this flag at the end.

    From the mod_rewrite documentation:

    Modifying the Query String

    By default, the query string is passed through unchanged. You can,
    however, create URLs in the substitution string containing a query
    string part. Simply use a question mark inside the substitution string
    to indicate that the following text should be re-injected into the
    query string. When you want to erase an existing query string, end the
    substitution string with just a question mark. To combine new and old
    query strings, use the [QSA] flag.

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

Sidebar

Related Questions

UPDATE: First problem solved, second one described at the bottom of this post. UPDATE2:
First, a thank you in advance. Second, this is my first post so apologies
I ask this question because I've implemented a javascript solution to nested inlines (it
Ok, I need something like this: datediff(second, date_one, date_two) < 1 dates are stored
This is my second question on Bamboo ( My First One ). My understanding
this is the second game that I'm having issues with in the same area...
I know I'm a newbie in Rails but this is the second day I'm
I hope it's the heat, this is the second question today and it's one
I have the following paragraphs: <p>This is a first paragraph.</p> <p>This is a second</p>
This bit of code is taking almost a half second to execute. Could somebody

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.