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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:05:35+00:00 2026-05-20T14:05:35+00:00

Special string – (dash) in Substitution means no substitution and is useful when you

  • 0

Special string - (dash) in Substitution means no substitution and is useful when you need to apply the rule while leaving original URL untouched.

So:

RewriteRule ^(somefile|somedir|someotherfile) - [L]

This tells mod_rewrite to leave the URL unchanged and quit processing rules if the requested subdirectory or file PREFIX is one of those in the alternate list.
If the requested subdirectory is in the list, all the rules after this one get skipped.

I don’t understand why here we need the dash? Why we need to leave the original URL untouched. Since we are telling that this rule is the [L] (last) if any of the list options is the case, why do we need the - (dash) ?

  • 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-20T14:05:36+00:00Added an answer on May 20, 2026 at 2:05 pm

    It’s only there to have a consistent syntax. The dash explicitly tells httpd not to rewrite anything. Consider what httpd would think of that line if you removed the dash:

    RewriteRule ^(somefile|somedir|someotherfile) [L]
    

    The flag in brackets would be interpreted as the rewrite target and you would rewrite all matching URLs to [L] instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Special characters in Password are converting URL into a String and truncating the URL
I have a LINQ entity that I need to create a special string value
I'm trying to link an RPATH containing the special string $ORIGIN into an executable
str_replace('Ê','',$line); Ain't working. Is there some special string that represents that?
How to detect if a string contains special characters like #,$,^,&,*,@,! etc (non-alphanumeric characters)
I have a bunch of string with special escape codes that I want to
To this bit of code I pass the string kellogs special k and I
This is a bit special: I'm loading some HTML in string form into the
I have a string object with multiple characters and even special characters I am
I want to remove all special characters from a string. Allowed characters are A-Z

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.