1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Mod_Rewrite, underscore or not?

Discussion in 'Apache' started by pipes, Jun 9, 2009.

  1. #1
    Hi, within Mod_Rewrite, does it matter if you include an underscore or not? What one do you prefer?

    Example:

    RewriteEngine On
    Rewrite_Engine On

    Is it purely personal choice or should one be used instead of the other?
     
    pipes, Jun 9, 2009 IP
    Bohra likes this.
  2. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #2
    I Think it doesnt matter though never tried it

    I Always use
    RewriteEngine On

    coz that is now standardize used in most of the scripts
     
    Bohra, Jun 11, 2009 IP
    pipes likes this.
  3. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #3
    Thanks Bohra, il go with your choice.
     
    pipes, Jun 11, 2009 IP
  4. ajsa52

    ajsa52 Well-Known Member

    Messages:
    3,426
    Likes Received:
    125
    Best Answers:
    0
    Trophy Points:
    160
    #4
    I Always use "RewriteEngine On" too, and "RewriteRule", FilesMatch, SetEnvIf ...
    So, I've never used directives with underscores.
     
    ajsa52, Jun 18, 2009 IP
    pipes likes this.
  5. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #5
    Thanks to you too ajsa52
     
    pipes, Jun 19, 2009 IP
  6. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #6
    I didn't even know Apache would interpret directives with underscores in them, let alone have I used them.
     
    joebert, Jun 21, 2009 IP
  7. eth1

    eth1 Peon

    Messages:
    10
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    As Linux is case sensitive, so are configurations/directives etc of various daemons. The Apache directive to enable/disable mod_rewrite is RewriteEngine so you must use RewriteEngine On/Off.

    Anything else will result in a 500 Internal Server Error as Apache would not understand the directive you have put inside the .htaccess.
     
    eth1, Jun 22, 2009 IP