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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:48:30+00:00 2026-05-30T08:48:30+00:00

I am working on a website with multi-language support. The URLs are in the

  • 0

I am working on a website with multi-language support. The URLs are in the format:

https://example.com/gb/en/
https://example.com/fr/fr/

gb refers to the country, en refers to the language. The .htaccess file handles these variables and loads the language specific data from a file.

I am trying to duplicate this site in a subfolder, and have it working completely seperately to the original site.

https://example.com/promo/gb/en/
https://example.com/promo/fr/fr/

My .htaccess file looks like this:

Options +FollowSymlinks
RewriteEngine on

RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,NC,L]

ErrorDocument 404 /404.php

#force https 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://example.com/$1 [R,L]

RewriteRule \.js$ /sprocketize.php [QSA,L,NC]

RewriteRule ^(admin) - [L,NC]
RewriteRule ^(app) - [L,NC]
RewriteRule ^(ws) - [L,NC]
RewriteRule ^(opia) - [L,NC]

RewriteRule ^promo-select(/)?$ /promo-select.php [L,NC]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{HTTP_HOST} ^(www.)?example\.com$ [NC]
RewriteRule ^([a-z]{2})/(.+)/$ http://%{HTTP_HOST}/$1/$2 [R=301,L] 

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-z]{2})/([a-z]{2})(?:/(.*)|)$ /$1/$3?lang=$2 [NC,QSA,PT]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-z]{2})(?:/(.*)|)$ /$2?country=$1 [NC,QSA,PT]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php !-f
RewriteRule ^([^/]+)/(.*)$ /$2?keyword=$1 [NC,QSA,PT]

RewriteCond %{REQUEST_URI} !(\.[^./]+)$
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ /$1.php [NC,QSA]

I’ve tried changing

RewriteRule ^([^/]+)/(.*)$ /$2?keyword=$1 [NC,QSA,PT]

to

RewriteRule ^promo/([^/]+)/(.*)$ /promo/$2?keyword=$1 [NC,QSA,PT]

etc., but it’s either loading the original site or showing a ‘page not found’ error. I’ve also tried adding RewriteBase /promo but it just loaded the main site. I suspect I’m doing something obvious/stupid wrong. Thanks.

UPDATE

I should have said, the files in the subfolder are the same as the root folder, including the .htaccess file. There are 2 .htaccess files, 1 in the root, 1 in the subfolder. I’ve been editing the one in the subfolder.

  • 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-30T08:48:31+00:00Added an answer on May 30, 2026 at 8:48 am

    Important
    While working with .htaccess is usually important to clear browser cache after editing the file. I’ve had some problems with this

    Have you tried to rewrite urls to your folder?

    RewriteEngine On
    RewriteBase /promo/
    

    Notice the trailing ‘/’ and this, I think, should be on top

    I use this and it works with my server…

    Please try this and tell us what happens:
    1. Change

    RewriteRule ^promo-select(/)?$ /promo-select.php [L,NC]
    

    to:

    RewriteRule ^promo-select(/)?$ promo-select.php [L,NC]
    

    If above don’t work, try:
    Change

    RewriteRule ^promo-select(/)?$ /promo-select.php [L,NC]
    

    to:

    RewriteRule ^promo-select(/)?$ /promo/promo-select.php [L,NC]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on multi-language website. For example, DB table pages for 1 lang looks
We are planning on adding multi-language support for our ASP.NET Website. I understand the
Working on a website http://www.ArenaText.com written in asp.net with Microsoft AJAX control toolkit. iPad
I'm making a multi language website and i decided to use sessions to remember
What's the best way to make a website localized to multi languages? I'm working
I am working on a multi-lingual website in Drupal 7. I installed the i18n
I'm working on multi-lang website. Trying to design optimal db schema for this purpose.
I'm working on a multi-user internet database-driven website with SQL Server 2008 / LinqToSQL
I need to setup CodeIgniter to be a truly multi language website. I've searched
Working on a website that has Employee and Branch entities, using a database table

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.