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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:11:01+00:00 2026-05-26T13:11:01+00:00

I have a page that does two things: When users click on this link:

  • 0

I have a page that does two things:

When users click on this link:
http://www.example.com/whatever_200/index.html/?id=4 it is actually processed by
http://www.example.com/search/profile-condo.php?id=4

However, I also want to do the following for people in Brazil
http://www.example.com/br/whatever_200/index.html/?id=4
http://www.example.com/br/search/profile-condo.php?id=4

The following works great for the english version:

addhandler x-httpd-php5 .html
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/index.html$ /search/profile-condo.php?name=$1&%{QUERY_STRING} [L,QSA]

But when I add

RewriteRule ^(.*)/br/^(.*)/index.html$ /br/search/profile-condo.php?name=$1&%{QUERY_STRING} [L,QSA]

It doesn’t work.

What am I doing wrong?

  • 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-26T13:11:02+00:00Added an answer on May 26, 2026 at 1:11 pm

    There are three problems with your rules.

    First of all the rule order. The first rule will match anything ending with /index.html, and it will perform the redirect. It is (properly) flagged as the final rule (the L flag). Because of that, the second rule will never be executed. If you add add the br rule before the general rule, it will be tested first, and if it matches, the redirect will occur.

    The second problem is the regular expression on your second rule. It contains a circumflex ^ halfway the expression. The circumflex means start of string, which obviously never occurs in the middle of the string. Removing the circumflex will fix that.

    A third issue is that you’re allowing characters before the /br/ part of your url (by having (.*) in your expression. According to your description, you do not actually need this.

    Summarizing:

    addhandler x-httpd-php5 .html
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^/br/(.*)/index.html$ /br/search/profile-condo.php?name=$1&%{QUERY_STRING} [L,QSA]
    RewriteRule ^(.*)/index.html$ /search/profile-condo.php?name=$1&%{QUERY_STRING} [L,QSA]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PHP page that does a couple of different things depending on
I'm new to using SugarCRM. I want to have a users page that does
Assume I have the link http://www.somesite.com/file.aspx?a=1&b=2 And now I want to remove all the
I have a page that needs to do two things at once: Listen all
I have a nice page that does everything I need. However one of the
Let's say you have a aspx page that does not rely on session, but
I have two ASP.NET pages: site.com/foo/bar.aspx that should be world accessible and site.com/foo/baz.aspx that
I have a CGI script that does a lot things. I'm trying to keep
I have a page that is generated which inserts an HTML comment near the
I have a page that uses $(id).show(highlight, {}, 2000); to highlight an element when

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.