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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:57:37+00:00 2026-06-12T09:57:37+00:00

I was trying to learn the htaccess basics but initial step made me go

  • 0

I was trying to learn the htaccess basics but initial step made me go crazy and lost some precious time..

htaccess codes behaves differently when written in single line and when written in two different lines

the code below

RewriteEngine on 
RewriteRule .* good.html   

And the code below

RewriteEngine on RewriteRule .* good.html   

Behave differently..

Please explain how it goes..
I guess, its because htaccess checks all the conditions first and then works..
but that too should not make it work like that..

  • 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-12T09:57:38+00:00Added an answer on June 12, 2026 at 9:57 am

    Apache directives expect to be on a line by itself. So when you have:

    RewriteEngine on RewriteRule .* good.html   
    

    The first “word” is the directive, e.g. RewriteEngine. It looks for whether it should be on or off, and the next “word” is on. So far so good, the rewrite engine is turned on. But there’s a bunch of other crap after that and it’ll be ignored.

    But when you have:

    RewriteEngine on 
    RewriteRule .* good.html   
    

    The rewrite engine is turned on like normal. Then a RewriteRule directive is processed. The first “word” in the line is RewriteRule, so the params are RewriteRule regex target [flags].

    So when they’re on different lines, everything gets internally rewritten to good.html. On the same time, everything after on is ignored.

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

Sidebar

Related Questions

Trying to learn some R after doing mostly Haskell for rather a long time
Im trying to learn OOP but I need to see some real case scenarios
Im trying to learn a bit about c++ and have run in to some
I'm trying to learn a bit of .htaccess and am really anxious on what
trying to learn and practice arrays but I have a problem with this small
im trying to learn how to use javascript objects, and got some issue here.
Trying to learn F# but got confused when trying to distinguish between fold and
im trying to learn some jsp as well as the spring framework. My application
I trying to learn OOP and I've made this class class boo{ function boo(&another_class,
Trying to learn PHP and a more experienced dev made a number of modifications

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.