Forum Moderators: phranque
Lines that begin with the hash character "#" are considered comments, and are ignored. Comments may not be included on the same line as a configuration directive.
The backslash "\" may be used as the last character on a line to indicate that the directive continues onto the next line. There must be no other characters or white space between the backslash and the end of the line.
<IfDefine COMMENT_OUT>
script line 1
script line 2
script line 3
</IfDefine>
<IfDefine !COMMENT_OUT>
:
while i personally haven't tried a backslash to continue a .htaccess comment line, it might work...
#RewriteRule ^foo$\
/bar\
[R,L] #RewriteCond %{HTTP_HOST} example [NC]\
RewriteRule ^a$ /b [R,L]\
RewriteRule ^c$ /d [R,L]\
RewriteRule ^e$ /f [R,L] # All commented out\
RewriteRule ^a$ /b [R,L]\
RewriteRule ^c$ /d [R,L]\
RewriteRule ^e$ /f [R,L] This will probably also confuse your code editors syntax highlighting.Mine gets confused in the rare case of a mid-line # (probably only occurs when you're redirecting to a fragment). But the highlighting only applies to the end of the line.