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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:59:52+00:00 2026-06-14T10:59:52+00:00

I have updated country code in the base path and I am attempting the

  • 0

I have updated country code in the base path and I am attempting the redirect users that end up going to:
http://www.example.com/uk/etc1/etc2/etc..

http://www.example.com/gb/etc1/etc2/etc..

But also sometimes also http://www.example.com/uk#etc

I thought this would be fairly trivial in mod_rewrite I cant get anything to work.

The closest I feel I have come is the following rule, but nothing happens when I land on uk.

<IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine on

    RewriteRule .* index.php [L] #this is active already on the page

    RewriteRule   ^/uk(.*) /gb(.*) [R]
</IfModule>

Edit:

This seems closer but I am getting stuck in an endless loop:

RewriteRule ^uk(.*) /gb$1 [R]

Edit 2 / (3) Answer:

This seems to redirect correctly(is correct):

RewriteRule ^uk(.*)$ /gb$1 [R=302,L]

RewriteRule .* index.php [L]

But the formatting is broken on the page, looks like some loop problem.

But the formatting is incorrect, If I swap the two RewriteRules the formatting is correct but the uk => gb conversion doesn’t seem to get called at all.

Answer

Be careful of Rewriteconditions, I failed to notice the significance of them and I removed them for the original index.php rewrite which meant it could not locate any media.
I failed to take notice of the rewrite conditions which applied for the original index.php

  • 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-14T10:59:54+00:00Added an answer on June 14, 2026 at 10:59 am

    This should do the trick:

    Options +FollowSymLinks
    
    DirectoryIndex index.php
    
    RewriteEngine on        
    RewriteRule   ^/uk(.*) /gb$1 [R=301,L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have updated my website. Previously there were links like these: http://example.com/bla-bla-bla?language=de . After
I have updated my jSon object using the code <script type=text/javascript > jQuery(document).ready(function($){ var
I have updated many records already, but when it came to a word that
I have updated code for ActiveX functionality which already installed on client(in their Windows
Okay I have updated my code quite a bit. I am getting a new
I have some ASP code that I've inherited from my predecessor (no, it's not
I have a User entity that has a Current Location field (city and country).
UPDATED I have an application that updates a combobox based on the values selected
I have following code on http://septicsecurity.com/facebook.html It used to work, but does not work
I have the following models: class Post < ActiveRecord::Base has_and_belongs_to_many :countries end class User

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.