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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:22:44+00:00 2026-05-31T07:22:44+00:00

This configuration is used to rewrite a URL to a sub-directory for versioning purposes,

  • 0

This configuration is used to rewrite a URL to a sub-directory for versioning purposes, while also pushing the entire query string in a single GET variable called “request”, so as to strip out the question mark from the URL.

RewriteEngine On
RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule .* - [L]
RewriteRule (www/.*)$ 2.0/public/$1 [L]
RewriteRule ^(.*+)$ 2.0/public/index.php?request=$1 [L]
DirectoryIndex index.php

I patched this together and by some miracle it works for my purposes, but I’m still not 100% sure why. I need all these lines for it to work correctly. Specifically I need help with line 2 and 3.

I understand that the [L] flag stops processing the rewrite of the current request, and then makes a new request, which needs to be processed again according to the rules (so that probably explains line 2). What is the purpose of line 3?

  • 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-31T07:22:45+00:00Added an answer on May 31, 2026 at 7:22 am

    Let’s first number your lines, because it’s not clear what you’re referring to:

    1. RewriteEngine On
    2. RewriteCond %{ENV:REDIRECT_STATUS} 200
    3. RewriteRule .* - [L]
    4. RewriteRule (www/.*)$ 2.0/public/$1 [L]
    5. RewriteRule ^(.*+)$ 2.0/public/index.php?request=$1 [L]
    6. DirectoryIndex index.php
    

    Now, let’s try to explain what each line means:

    1. Turn on URL rewriting.
    2. If the requested file was found
    3. … then just return it and stop.
    4. Otherwise, if the URL starts with “www/”, then redirect to subfolder “2.0/public/” and append the entire request string.
    5. Otherwise, if the URL has at least 1 character following the domain name, then redirect to “2.0/public/index.php?request=” and append the entire request string as a parameter.
    6. Specifies default handler.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I used schemaExport to create my tables like this Configuration config = new Configuration();
Has anyone got this configuration working? Latest Netbeans, latest Glassfish, I created an EJB
In my DefaultRegistry I have this configuration: ForRequestedType<INHUnitOfWork>().CacheBy(InstanceScope.HttpContext) .TheDefault.Is.OfConcreteType<NHibernateUnitOfWork>(); At some point in the
I am trying out GWT in this 'configuration': 1) I have written a server
This is my configuration for log4net: <log4net> <appender name=MyLogger type=log4net.Appender.RollingFileAppender> <file value=MyLog.log /> <appendToFile
This is my configuration : <org.springframework.version>3.1.0.RELEASE</org.springframework.version> <spring.data.mongo.version>1.0.0.RC1</spring.data.mongo.version> Is it possible to split from this
I have this Perl script with many defined constants of configuration files. For example:
I'm usng this: http://schemas.microsoft.com/cdo/configuration/smtpauthenticate The schema is down? My software doesn't work anymore. Gives
When using fluent configuration to specify fluent mappings like this: .Mappings(m => m.FluentMappings.AddFromAssembly(typeof(UserMapping).Assembly)) At
This is my app.config file looks like: <?xml version=1.0 encoding=utf-8 ?> <configuration> <appSettings> <add

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.