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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T22:51:53+00:00 2026-05-28T22:51:53+00:00

Why is this causing a redirect loop? Options +FollowSymlinks RewriteEngine on RewriteBase /summary/1/document/ RewriteRule

  • 0

Why is this causing a redirect loop?

Options +FollowSymlinks
RewriteEngine on
RewriteBase /summary/1/document/

RewriteRule !^[a-z]{2}/ /summary/1/document/en/ [L,R]
RewriteRule ^([a-z]{2})/ ../index.php?lang=$1&type=document

What I am trying to achieve is:

If there’s no language specified, redirect to english:

Example:

website.com/summary/1/document --> website.com/summary/1/document/en/
website.com/summary/1/document/fr/ [no redirect]

And when a language is specified, rewrite internally to ../index.php with lang and type parameters.

  • 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-28T22:51:53+00:00Added an answer on May 28, 2026 at 10:51 pm

    From Flag L: Apache Docs: flag_l :

    If you are using RewriteRule in either .htaccess files or in <Directory> sections, it is important to have some understanding of how the rules are processed. The simplified form of this is that once the rules have been processed, the rewritten request is handed back to the URL parsing engine to do what it may with it. It is possible that as the rewritten request is handled, the .htaccess file or section may be encountered again, and thus the ruleset may be run again from the start. Most commonly this will happen if one of the rules causes a redirect – either internal or external – causing the request process to start over.


    Since, rewritten request is handed back to the URL parsing engine, after redirect from the first rewrite rule,

    Try this:

    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /summary/1/document/
    
    RewriteRule ![a-z]{2}/$ /summary/1/document/en/ [NC,L,R]
    RewriteRule ^([a-z]{2})/$ ../index.php?lang=$1&type=document [L,QSA]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone explain what might be causing this error. Im thinking its the quotes.
I'm not sure what is causing this, but I am using cluetip and binding
I don't know what could be causing this issue, but for some reason, elements
I have DocumentRoot /var/www/test in my .htaccess file. This is causing the apache server
I THINK this line is causing a 3.5K Byte memory leak, any ideas why?
Gah! This is really causing me hassle today. Suddenly without warning '@' (at symbol)
This line in YUI's Reset CSS is causing trouble for me: address,caption,cite,code,dfn,em,strong,th,var { font-style:
This relates to my previous post: jQuery .load Method causing page refresh AJAX I
This morning we found an old chunk of code that was causing a library
I have a problem with IE causing two errors: 1. Object doesn't support this

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.